1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-24 02:37:05 +00: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:
Felix Spöttel 2020-09-06 13:08:44 +02:00
parent 4791c2fc62
commit 2ea97f0643

View File

@ -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),