mirror of
https://github.com/simple-login/app.git
synced 2026-04-07 19:27:34 +00:00
Lowercase contacts to prevent abuse
This commit is contained in:
+2
-2
@@ -206,7 +206,7 @@ def get_or_create_contact(from_header: str, mail_from: str, alias: Alias) -> Con
|
||||
# either reuse a contact with empty email or create a new contact with empty email
|
||||
contact_email = ""
|
||||
|
||||
contact_email = sanitize_email(contact_email, not_lower=True)
|
||||
contact_email = sanitize_email(contact_email)
|
||||
|
||||
if contact_name and "\x00" in contact_name:
|
||||
LOG.w("issue with contact name %s", contact_name)
|
||||
@@ -337,7 +337,7 @@ def replace_header_when_forward(msg: Message, alias: Alias, header: str):
|
||||
full_addresses += address.parse_list(h)
|
||||
|
||||
for full_address in full_addresses:
|
||||
contact_email = sanitize_email(full_address.address, not_lower=True)
|
||||
contact_email = sanitize_email(full_address.address)
|
||||
|
||||
# no transformation when alias is already in the header
|
||||
if contact_email.lower() == alias.email:
|
||||
|
||||
Reference in New Issue
Block a user