core: force lowercase emails for gravatar usage

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-11-10 12:40:20 +01:00
parent b515bf7d2e
commit cc0832f487
1 changed files with 1 additions and 1 deletions

View File

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