From cc0832f48748ebb9bbec23f7d2bee3383e0a56ae Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 10 Nov 2021 12:40:20 +0100 Subject: [PATCH] core: force lowercase emails for gravatar usage Signed-off-by: Jens Langhammer --- authentik/core/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authentik/core/models.py b/authentik/core/models.py index 766df053b..2e022d667 100644 --- a/authentik/core/models.py +++ b/authentik/core/models.py @@ -174,7 +174,7 @@ class User(GuardianUserMixin, AbstractUser): if mode == "none": return DEFAULT_AVATAR # gravatar uses md5 for their URLs, so md5 can't be avoided - mail_hash = md5(self.email.encode("utf-8")).hexdigest() # nosec + mail_hash = md5(self.email.lower().encode("utf-8")).hexdigest() # nosec if mode == "gravatar": parameters = [ ("s", "158"),