Opened 9 years ago
Closed 9 years ago
#25337 closed New feature (needsinfo)
Validate domains against IDNA2008 instead of IDNA2003
Reported by: | JocelynD | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | 1.8 |
Severity: | Normal | Keywords: | domains idn idna |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
IDNA domains validation is a mess, anyway, it's going forward, and IDNA2008 refines IDNA2003 proposal to better define what is a valid IDN domain and what is not.
ICANN/IANA recomends using IDNA2008
However, python standard lib only offers IDNA2003 validation in , and one have to use a 3rd party lib to encode/validate against IDNA2008.
Currently, on URLValidator, EmailValidator (and soon DomainNameValidator ?), Django relies on Python builtin str.encode('idna')
.
I don't come with a solution for Django, and I know that Django avoid to depend on 3rd-party libs.
However I do think that it would be a good thing that Django validates domains against IDNA2008.
What do you think ?
Change History (4)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
comment:4 by , 9 years ago
Resolution: | → needsinfo |
---|---|
Status: | new → closed |
Type: | Uncategorized → New feature |
Got only one response on the mailing list:
If I do not miss something, this is a "bug" in Python and not in Django. However, I believe it could be good idea to have the 3rd-party idna package as an optional dependency that Django makes use of if present but works completely without it.
Closing this ticket as "needsinfo" absent a concrete proposal of how to address this in Django. If someone is interested in this, please send your proposal to the mailing list and we can reopen the ticket if it's accepted.
It's a good idea to raise issues like this that may require some discussion on the DevelopersMailingList. That reaches a wider audience than this ticket tracker.