#17867: validate_email fails with IDN domains
-----------------------------------------+------------------------
     Reporter:  Pierre <pierre.matri@…>  |      Owner:  nobody
         Type:  Bug                      |     Status:  new
    Component:  Forms                    |    Version:  1.4-beta-1
     Severity:  Normal                   |   Keywords:  idn
 Triage Stage:  Unreviewed               |  Has patch:  1
Easy pickings:  0                        |      UI/UX:  0
-----------------------------------------+------------------------
 URLValidator has been fixed with #12988. However, validate_email still
 fails with IDN E-mail addresses, especially with long TLDs (see
 [http://idn.icann.org/E-mail_test] for examples).

 {{{
 >>> import django
 >>> django.get_version()
 '1.4c1'
 >>>
 >>> from django.core.validators import validate_email
 >>> validate_email('[email protected]')
 Traceback (most recent call last):
   File "<console>", line 1, in <module>
   File "/home/dev/coolo-django/local/lib/python2.7/site-
 packages/django/core/validators.py", line 155, in __call__
     super(EmailValidator, self).__call__(u'@'.join(parts))
   File "/home/dev/coolo-django/local/lib/python2.7/site-
 packages/django/core/validators.py", line 44, in __call__
     raise ValidationError(self.message, code=self.code)
 ValidationError: [u'Enter a valid e-mail address.']
 >>> validate_email('[email protected]')
 Traceback (most recent call last):
   File "<console>", line 1, in <module>
   File "/home/dev/coolo-django/local/lib/python2.7/site-
 packages/django/core/validators.py", line 155, in __call__
     super(EmailValidator, self).__call__(u'@'.join(parts))
   File "/home/dev/coolo-django/local/lib/python2.7/site-
 packages/django/core/validators.py", line 44, in __call__
     raise ValidationError(self.message, code=self.code)
 ValidationError: [u'Enter a valid e-mail address.']
 >>> validate_email('[email protected]')
 Traceback (most recent call last):
   File "<console>", line 1, in <module>
   File "/home/dev/coolo-django/local/lib/python2.7/site-
 packages/django/core/validators.py", line 155, in __call__
     super(EmailValidator, self).__call__(u'@'.join(parts))
   File "/home/dev/coolo-django/local/lib/python2.7/site-
 packages/django/core/validators.py", line 44, in __call__
     raise ValidationError(self.message, code=self.code)
 ValidationError: [u'Enter a valid e-mail address.']
 >>>
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17867>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to