From 66b7c768368e02526b9da564fdd9bc5a435d7354 Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Thu, 9 Feb 2023 16:04:13 +0100 Subject: [PATCH] Doh. Without this email delivery from RELAYNET is broken --- 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 435defb5..27e8861c 100644 --- a/core/admin/mailu/internal/views/auth.py +++ b/core/admin/mailu/internal/views/auth.py @@ -33,7 +33,7 @@ def nginx_authentication(): for key, value in headers.items(): response.headers[key] = str(value) is_valid_user = False - username = response.headers['Auth-User'] + username = response.headers.get('Auth-User', None) if response.headers.get("Auth-User-Exists") == "True": if utils.limiter.should_rate_limit_user(username, client_ip): # FIXME could be done before handle_authentication()