#25452: Email validation for domain `gmail.-com` is considered valid
------------------------+------------------------------------
Reporter: phalt | Owner: bak1an
Type: Bug | Status: assigned
Component: Forms | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------+------------------------------------
Changes (by bak1an):
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/5612 The pull request]
Unfortunately I have not found a good way to merge URLValidator and
EmailValidator since there are tons of small differences.
So I decided to fix EmailValidator instead. I tried to be as accurate as
possible (actual regex changes are just few characters long).
During reading various RFCs and articles I've found some other easy-
fixable issues (like allowing quoted '@', space or backslash for dot atom
local part, allowing spaces inside quoted local part, etc) those are
included in above PR as well.
Proper RFC-based email validation is a
[http://haacked.com/archive/2007/08/21/i-knew-how-to-validate-an-email-
address-until-i.aspx/ surprisingly hard task] and definitely no one wants
to have [http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html few pages
long regex] in Django.
So updated validator is still not fully RFC compliant but few issues are
fixed now (or covered with test cases).
Commit messages includes detailed description of all changes that were
made.
--
Ticket URL: <https://code.djangoproject.com/ticket/25452#comment:6>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/063.08e0ee755034e7e62190867a8b4922df%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.