validate_email accepts trailing dash
|Reported by:||Owned by:||Erik Romijn|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
In django 1.6 an EmailField (validate_email) will accept an address with a trailing dash at the end. Example: 'foo@…-'
In django 1.4 it would trigger a ValidationError, so I believe this is a regression.
Tested like so:
>>> from django.core.validators import validate_email >>> validate_email('email@example.com-')
expected: throws ValidationError
actual: no error thrown
This may be related to #12027, about the same behavior, but with a trailing dot. As with that bug, a trailing dash causes sendmail to throw an error.
Change History (7)
comment:1 Changed 2 years ago by
|Patch needs improvement:||unset|
|Triage Stage:||Unreviewed → Accepted|