#31053: EmailValidator should not accept soft hyphen in email addresses.
-----------------------------+--------------------------------------
Reporter: Mogoh Viol | Owner: nobody
Type: Bug | Status: closed
Component: Core (Mail) | Version: master
Severity: Normal | Resolution: needsinfo
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Comment (by Joachim Jablon):
Ok, gonna do my best from a phone.
If I recall correctly, the idea is that as much as possible, emails that
pass the validator should be properly processed.
Given that it’s fairly easy to split the local and domain parts (the last
@ sign is the separator), then it’s feasible to blindly apply punycode if
the domain contains non-ascii characters, which is done in the code. The
same cannot be done for local part.
For the local part, it’s a bit complicated and there are some things to
take into account:
- on the validator side, special chars are accepted if the local part is
enclosed between double quotes: "kéké"@example.com
- The algorithm is a bit different if the validation part and in the
sending part because validation only accepts emails whereas email sending
accepts boths emails and mailboxes (Your Name <[email protected]>)
--
Ticket URL: <https://code.djangoproject.com/ticket/31053#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/063.bb999f5d38df19a9a47d8e0590abf6bf%40djangoproject.com.