ignore contact name that has hex ascii code \x00

This commit is contained in:
Son Nguyen Kim 2021-09-27 10:21:49 +02:00
parent 408322217d
commit 3ad961bfb9
1 changed files with 4 additions and 0 deletions

View File

@ -211,6 +211,10 @@ def get_or_create_contact(from_header: str, mail_from: str, alias: Alias) -> Con
contact_email = sanitize_email(contact_email)
if contact_name and "\x00" in contact_name:
LOG.w("issue with contact name %s", contact_name)
contact_name = ""
contact = Contact.get_by(alias_id=alias.id, website_email=contact_email)
if contact:
if contact.name != contact_name: