Fixed an issue where Reset Password is not working after upgrading to latest flask-security-too. #6191

This commit is contained in:
Aditya Toshniwal
2023-04-27 13:19:09 +05:30
parent 46a9d4a69d
commit e20e75aeba
2 changed files with 4 additions and 1 deletions

View File

@@ -1080,7 +1080,8 @@ if hasattr(config, 'SECURITY_RECOVERABLE') and config.SECURITY_RECOVERABLE:
if invalid or expired:
return redirect(url_for('browser.forgot_password'))
has_error = False
form = _security.reset_password_form()
form_class = _security.forms.get('reset_password_form').cls
form = form_class(request.form) if request.form else form_class()
if form.validate_on_submit():
try: