mirror of
https://github.com/simple-login/app.git
synced 2024-09-30 05:31:30 +02:00
Send the email after the local error.
This commit is contained in:
parent
f7f91afc1e
commit
42407a0543
@ -92,6 +92,10 @@ def mfa():
|
|||||||
return response
|
return response
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
flash("Incorrect token", "warning")
|
||||||
|
# Trigger rate limiter
|
||||||
|
g.deduct_limit = True
|
||||||
|
otp_token_form.token.data = None
|
||||||
send_email_with_rate_control(
|
send_email_with_rate_control(
|
||||||
user,
|
user,
|
||||||
ALERT_INVALID_TOTP_LOGIN,
|
ALERT_INVALID_TOTP_LOGIN,
|
||||||
@ -107,10 +111,6 @@ def mfa():
|
|||||||
),
|
),
|
||||||
1,
|
1,
|
||||||
)
|
)
|
||||||
flash("Incorrect token", "warning")
|
|
||||||
# Trigger rate limiter
|
|
||||||
g.deduct_limit = True
|
|
||||||
otp_token_form.token.data = None
|
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
"auth/mfa.html",
|
"auth/mfa.html",
|
||||||
|
@ -68,6 +68,7 @@ def recovery_route():
|
|||||||
else:
|
else:
|
||||||
# Trigger rate limiter
|
# Trigger rate limiter
|
||||||
g.deduct_limit = True
|
g.deduct_limit = True
|
||||||
|
flash("Incorrect code", "error")
|
||||||
send_email_with_rate_control(
|
send_email_with_rate_control(
|
||||||
user,
|
user,
|
||||||
ALERT_INVALID_TOTP_LOGIN,
|
ALERT_INVALID_TOTP_LOGIN,
|
||||||
@ -83,6 +84,5 @@ def recovery_route():
|
|||||||
),
|
),
|
||||||
1,
|
1,
|
||||||
)
|
)
|
||||||
flash("Incorrect code", "error")
|
|
||||||
|
|
||||||
return render_template("auth/recovery.html", recovery_form=recovery_form)
|
return render_template("auth/recovery.html", recovery_form=recovery_form)
|
||||||
|
Loading…
Reference in New Issue
Block a user