mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-25 10:10:19 -06:00
Fix an issue where changing MFA_SUPPORTED_METHODS breaks the MFA validation. #6624
This commit is contained in:
parent
9ab36b0269
commit
2aea5b41ad
@ -3,7 +3,7 @@
|
||||
'actionUrl': url_for('mfa.validate'),
|
||||
'views': views,
|
||||
'logoutUrl': logout_url,
|
||||
'sendEmailUrl': url_for("mfa.send_email_code"),
|
||||
'sendEmailUrl': send_email_url,
|
||||
'csrfHeader': current_app.config.get("WTF_CSRF_HEADERS")[0],
|
||||
'csrfToken': csrf_token()
|
||||
} %}
|
||||
|
@ -134,9 +134,14 @@ def validate_view() -> Response:
|
||||
if mfa_method is None and len(mfa_views) > 0:
|
||||
list(mfa_views.items())[0][1]['selected'] = True
|
||||
|
||||
send_email_url = None
|
||||
if 'email' in mfa_views:
|
||||
send_email_url = url_for("mfa.send_email_code")
|
||||
|
||||
return Response(render_template(
|
||||
"mfa/validate.html", _=_, views=mfa_views, base64=base64,
|
||||
logout_url=get_logout_url()
|
||||
logout_url=get_logout_url(),
|
||||
send_email_url=send_email_url
|
||||
), return_code, headers=_NO_CACHE_HEADERS, mimetype="text/html")
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user