Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#26204 closed Bug (fixed)

URLValidator does not accept TLDs with "-"s

Reported by: Luke Faraone Owned by: Tim Graham
Component: Core (Other) Version: 1.8
Severity: Normal Keywords: regression
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Luke Faraone)

Forwarded from:
http://bugs.debian.org/814372

Previous versions of Django allowed for "-"s in the rightmost component of a hostname. This was tightened in a previous release. While the case for punycode domains was fixed, there's no technical reason to disallow them in any part of a hostname component except for at the beginning or end.

That is to say: http://ubuntu-mirror.my-tld/ubuntu is flagged as an invalid URL, even though the DNS has an IP for it, and apt happily upgrades from the archive mirror that is there.

The fix for <https://code.djangoproject.com/ticket/25452#comment:2> appears to be when this regression was introduced.

Change History (7)

comment:1 Changed 4 years ago by Luke Faraone

Description: modified (diff)

comment:2 Changed 4 years ago by Luke Faraone

Description: modified (diff)

comment:3 Changed 4 years ago by Tim Graham

Component: UncategorizedCore (Other)
Owner: changed from nobody to Tim Graham
Status: newassigned
Triage Stage: UnreviewedAccepted

comment:4 Changed 4 years ago by Tim Graham

Has patch: set

comment:5 Changed 4 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In b1afebf8:

Fixed #26204 -- Reallowed dashes in top-level domains for URLValidator.

Thanks Shai Berger for the review.

comment:6 Changed 4 years ago by Tim Graham <timograham@…>

In 07ffee64:

[1.9.x] Fixed #26204 -- Reallowed dashes in top-level domains for URLValidator.

Thanks Shai Berger for the review.

Backport of b1afebf882db5296cd9dcea26ee66d5250922e53 from master

comment:7 Changed 4 years ago by Tim Graham <timograham@…>

In 0f667a58:

[1.8.x] Fixed #26204 -- Reallowed dashes in top-level domains for URLValidator.

Thanks Shai Berger for the review.

Backport of b1afebf882db5296cd9dcea26ee66d5250922e53 from master

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