[Django] #30875: Allow IDN domains

20 views
Skip to first unread message

Django

unread,
Oct 12, 2019, 7:37:02 AM10/12/19
to django-...@googlegroups.com
#30875: Allow IDN domains
-----------------------------------------+------------------------
Reporter: mschaffenroth | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 2.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
You cannot run django with an IDN domain since the django requests are
only validated for ascii domains.

See django/http/request.py

...
host_validation_re =
re.compile(r"^([a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9\.:]+\])(:\d+)?$")
...

Currently when you run django on a IDN domain you get the following error
message: "The domain name provided is not valid according to RFC
1034/1035."

--
Ticket URL: <https://code.djangoproject.com/ticket/30875>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 12, 2019, 7:37:52 AM10/12/19
to django-...@googlegroups.com
#30875: Allow IDN domains
-------------------------------+--------------------------------------

Reporter: mschaffenroth | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 2.2
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Description changed by mschaffenroth:

Old description:

> You cannot run django with an IDN domain since the django requests are
> only validated for ascii domains.
>
> See django/http/request.py
>
> ...
> host_validation_re =
> re.compile(r"^([a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9\.:]+\])(:\d+)?$")
> ...
>
> Currently when you run django on a IDN domain you get the following error
> message: "The domain name provided is not valid according to RFC
> 1034/1035."

New description:

You cannot run django with an IDN domain since the django requests are
only validated for ascii domains.

See django/http/request.py


{{{
...
host_validation_re =
re.compile(r"^([a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9\.:]+\])(:\d+)?$")
...
}}}

Currently when you run django on a IDN domain you get the following error
message: "The domain name provided is not valid according to RFC
1034/1035."

--

--
Ticket URL: <https://code.djangoproject.com/ticket/30875#comment:1>

Django

unread,
Oct 12, 2019, 9:29:28 AM10/12/19
to django-...@googlegroups.com
#30875: Allow IDN domains
-------------------------------+--------------------------------------
Reporter: mschaffenroth | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 2.2
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by Claude Paroz):

Generally I think that HTTP headers should be IDNA-encoded (check in
https://tools.ietf.org/html/rfc7230). Maybe a bug in some client sending
bad header content?

--
Ticket URL: <https://code.djangoproject.com/ticket/30875#comment:2>

Django

unread,
Oct 12, 2019, 9:29:37 AM10/12/19
to django-...@googlegroups.com
#30875: Allow IDN domains
-------------------------------+--------------------------------------
Reporter: mschaffenroth | Owner: nobody
Type: Bug | Status: new
Component: HTTP handling | Version: 2.2
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Claude Paroz):

* component: Uncategorized => HTTP handling


--
Ticket URL: <https://code.djangoproject.com/ticket/30875#comment:3>

Django

unread,
Oct 12, 2019, 10:38:19 AM10/12/19
to django-...@googlegroups.com
#30875: Allow IDN domains
-------------------------------+--------------------------------------
Reporter: mschaffenroth | Owner: nobody
Type: Bug | Status: new
Component: HTTP handling | Version: 2.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by mschaffenroth):

I figured out that we have a "_" in our domain name which is not an
allowed character according to the INDA standard

--
Ticket URL: <https://code.djangoproject.com/ticket/30875#comment:4>

Django

unread,
Oct 12, 2019, 10:48:35 AM10/12/19
to django-...@googlegroups.com
#30875: Allow IDN domains
-------------------------------+--------------------------------------
Reporter: mschaffenroth | Owner: nobody
Type: Bug | Status: closed

Component: HTTP handling | Version: 2.2
Severity: Normal | Resolution: invalid

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by mschaffenroth):

* status: new => closed
* resolution: => invalid


--
Ticket URL: <https://code.djangoproject.com/ticket/30875#comment:5>

Django

unread,
Oct 12, 2019, 10:53:45 AM10/12/19
to django-...@googlegroups.com
#30875: Allow IDN domains
-------------------------------+--------------------------------------
Reporter: mschaffenroth | Owner: nobody

Type: Bug | Status: closed
Component: HTTP handling | Version: 2.2
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by Claude Paroz):

See #19952 for the underscore issue.

--
Ticket URL: <https://code.djangoproject.com/ticket/30875#comment:6>

Reply all
Reply to author
Forward
0 new messages