validate_email accepts trailing dash
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('foo@bar.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)
Has patch: |
set
|
Triage Stage: |
Unreviewed → Accepted
|
Triage Stage: |
Accepted → Ready for checkin
|
Owner: |
changed from nobody to Sasha Romijn
|
Status: |
new → assigned
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
Tests are good, patch applies.