#25452: Email validation for domain `gmail.-com` is considered valid
----------------------------+--------------------
Reporter: phalt | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
----------------------------+--------------------
When entering an email like "[email protected]" the email validator returns
True.
Particularly, the `validate_domain_part` allows domains with a hyphen
character in the TLD:
{{{
from django.core.validators import validate_email
validate_email.validate_domain_part('gmail.-com')
True
}}}
Nearly all other special characters return correctly:
{{{
from django.core.validators import validate_email
validate_email.validate_domain_part('gmail._com')
False
}}}
Unless my knowledge of valid TLDs is wrong, I don't think this is correct
:(
--
Ticket URL: <https://code.djangoproject.com/ticket/25452>
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/048.7bc108a07e6c5045f94c9a71b64ab7ae%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.