#33968: Make EmailValidator and URLValidator IDNA 2008 compliant
-------------------------------------+-------------------------------------
               Reporter:  j-bernard  |          Owner:  nobody
                   Type:             |         Status:  new
  Uncategorized                      |
              Component:  Core       |        Version:  4.0
  (Mail)                             |       Keywords:  IDNA EAI
               Severity:  Normal     |  EmailValidator UrlValidator RFC
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 This ticket is the second of a list of tickets aiming at bringing Email
 Address Internationalization (EAI) compliance to Django by supporting
 International Domain Name (IDN) with regards to the latest standard (IDNA
 2008) and fixing some processing on internationalized domains or email
 addresses.
 Previous ticket: #33967

 Domain validation is not fully compliant with IDNA 2008 (either in
 EmailValidator or UrlValidator) as defined in
 [https://datatracker.ietf.org/doc/html/rfc5891#section-4.2 RFC5891
 section-4.2]

 A domain name cannot be validated properly with a regex, therefore, an IDN
 validation should be performed with an appropriate library.

 The current validation ignores IDNA errors. Instead, IDNA should be used
 for domain validation and the regex validation should be skipped for
 domains as it may lack some specific rules and then end up with invalid
 domains being accepted.

 Moreover, the current validation is made by performing a conversion to
 A-Label with the Python `encodings.idna` module which implements a
 deprecated standard (IDNA 2003).

 This conversion should be made IDNA 2008 compliant. The most used Python
 IDNA 2008 package is [https://pypi.org/project/idna/ idna], which is among
 the most downloaded Python packages according to PyPI (4th as for the
 current month) and referred in the
 [https://docs.python.org/3/library/codecs.html#module-encodings.idna
 official Python documentation].

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33968>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182f0469ad5-2de4e431-0646-4a4f-8d4f-39236be3a201-000000%40eu-central-1.amazonses.com.

Reply via email to