Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#30875 closed Bug (invalid)

Allow IDN domains

Reported by: Moritz Schaffenroth Owned by: nobody
Component: HTTP handling Version: 2.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Moritz Schaffenroth)

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."

Change History (6)

comment:1 by Moritz Schaffenroth, 5 years ago

Description: modified (diff)

comment:2 by Claude Paroz, 5 years ago

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?

comment:3 by Claude Paroz, 5 years ago

Component: UncategorizedHTTP handling

comment:4 by Moritz Schaffenroth, 5 years ago

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

comment:5 by Moritz Schaffenroth, 5 years ago

Resolution: invalid
Status: newclosed

comment:6 by Claude Paroz, 5 years ago

See #19952 for the underscore issue.

Note: See TracTickets for help on using tickets.
Back to Top