mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-03-05 15:57:23 +01:00
Do not log failed login attempts for MissingToken errors
* Due to the way that the /login UI works, this persists at least one failed login each time a user logs into the admin panel. This in turn triggers fail2ban at some point.
This commit is contained in:
@@ -127,9 +127,6 @@ def me():
|
|||||||
try:
|
try:
|
||||||
email, privs = auth_service.authenticate(request, env)
|
email, privs = auth_service.authenticate(request, env)
|
||||||
except totp.MissingTokenError as e:
|
except totp.MissingTokenError as e:
|
||||||
# Log the failed login
|
|
||||||
log_failed_login(request)
|
|
||||||
|
|
||||||
return json_response({
|
return json_response({
|
||||||
"status": "missing_token",
|
"status": "missing_token",
|
||||||
"reason": str(e),
|
"reason": str(e),
|
||||||
|
|||||||
Reference in New Issue
Block a user