From c9eae7bfbf1446713deeba5895ed363a67a0b696 Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Fri, 18 Aug 2023 17:01:15 +0200 Subject: [PATCH] Fix exception reported by diginzm --- core/admin/mailu/internal/views/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/admin/mailu/internal/views/auth.py b/core/admin/mailu/internal/views/auth.py index cea90e6d..6d37d923 100644 --- a/core/admin/mailu/internal/views/auth.py +++ b/core/admin/mailu/internal/views/auth.py @@ -28,7 +28,7 @@ def nginx_authentication(): response = flask.Response() response.headers['Auth-Status'] = status response.headers['Auth-Error-Code'] = code - if int(flask.request.headers['Auth-Login-Attempt']) < 10: + if int(flask.request.headers('Auth-Login-Attempt',0)) < 10: response.headers['Auth-Wait'] = '3' return response raw_password = urllib.parse.unquote(headers['Auth-Pass']) if 'Auth-Pass' in headers else ''