[Django] #26204: URLValidator does not accept TLDs with "-"s

59 views
Skip to first unread message

Django

unread,
Feb 10, 2016, 6:16:37 PM2/10/16
to django-...@googlegroups.com
#26204: URLValidator does not accept TLDs with "-"s
-------------------------------+------------------------
Reporter: lfaraone | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 1.8
Severity: Normal | Keywords: regression
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------
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
[https://github.com/django/django/commit/bc98bc56a52860688ea0ae2ec7b9e59ddb72a811
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.

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

Django

unread,
Feb 10, 2016, 6:18:53 PM2/10/16
to django-...@googlegroups.com
#26204: URLValidator does not accept TLDs with "-"s
-------------------------------+--------------------------------------

Reporter: lfaraone | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 1.8
Severity: Normal | Resolution:

Keywords: regression | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by lfaraone):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Old description:

> 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
> [https://github.com/django/django/commit/bc98bc56a52860688ea0ae2ec7b9e59ddb72a811
> 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.

New description:

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


[https://github.com/django/django/commit/bc98bc56a52860688ea0ae2ec7b9e59ddb72a811
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.

--

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

Django

unread,
Feb 10, 2016, 6:22:33 PM2/10/16
to django-...@googlegroups.com
#26204: URLValidator does not accept TLDs with "-"s
-------------------------------+--------------------------------------

Reporter: lfaraone | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 1.8
Severity: Normal | Resolution:

Keywords: regression | 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 lfaraone:

Old description:

> 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


> [https://github.com/django/django/commit/bc98bc56a52860688ea0ae2ec7b9e59ddb72a811
> 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.

New description:

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


[https://github.com/django/django/commit/bc98bc56a52860688ea0ae2ec7b9e59ddb72a811
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.

--

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

Django

unread,
Feb 11, 2016, 10:21:32 AM2/11/16
to django-...@googlegroups.com
#26204: URLValidator does not accept TLDs with "-"s
------------------------------+-------------------------------------
Reporter: lfaraone | Owner: timgraham
Type: Bug | Status: assigned
Component: Core (Other) | Version: 1.8
Severity: Normal | Resolution:
Keywords: regression | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+-------------------------------------
Changes (by timgraham):

* status: new => assigned
* owner: nobody => timgraham
* component: Uncategorized => Core (Other)
* stage: Unreviewed => Accepted


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

Django

unread,
Feb 11, 2016, 10:53:19 AM2/11/16
to django-...@googlegroups.com
#26204: URLValidator does not accept TLDs with "-"s
------------------------------+-------------------------------------
Reporter: lfaraone | Owner: timgraham
Type: Bug | Status: assigned
Component: Core (Other) | Version: 1.8
Severity: Normal | Resolution:
Keywords: regression | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+-------------------------------------
Changes (by timgraham):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/6123 PR]

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

Django

unread,
Feb 18, 2016, 7:45:11 PM2/18/16
to django-...@googlegroups.com
#26204: URLValidator does not accept TLDs with "-"s
------------------------------+-------------------------------------
Reporter: lfaraone | Owner: timgraham
Type: Bug | Status: closed

Component: Core (Other) | Version: 1.8
Severity: Normal | Resolution: fixed

Keywords: regression | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"b1afebf882db5296cd9dcea26ee66d5250922e53" b1afebf8]:
{{{
#!CommitTicketReference repository=""
revision="b1afebf882db5296cd9dcea26ee66d5250922e53"
Fixed #26204 -- Reallowed dashes in top-level domains for URLValidator.

Thanks Shai Berger for the review.
}}}

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

Django

unread,
Feb 18, 2016, 7:55:18 PM2/18/16
to django-...@googlegroups.com
#26204: URLValidator does not accept TLDs with "-"s
------------------------------+-------------------------------------
Reporter: lfaraone | Owner: timgraham
Type: Bug | Status: closed
Component: Core (Other) | Version: 1.8
Severity: Normal | Resolution: fixed
Keywords: regression | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"07ffee641174b4c43986cd516fc39eec2d91a90e" 07ffee64]:
{{{
#!CommitTicketReference repository=""
revision="07ffee641174b4c43986cd516fc39eec2d91a90e"
[1.9.x] Fixed #26204 -- Reallowed dashes in top-level domains for
URLValidator.

Thanks Shai Berger for the review.

Backport of b1afebf882db5296cd9dcea26ee66d5250922e53 from master
}}}

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

Django

unread,
Feb 18, 2016, 8:00:30 PM2/18/16
to django-...@googlegroups.com
#26204: URLValidator does not accept TLDs with "-"s
------------------------------+-------------------------------------
Reporter: lfaraone | Owner: timgraham
Type: Bug | Status: closed
Component: Core (Other) | Version: 1.8
Severity: Normal | Resolution: fixed
Keywords: regression | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"0f667a580a3cae4d891d07b0f9d3b44d8a01d4ed" 0f667a58]:
{{{
#!CommitTicketReference repository=""
revision="0f667a580a3cae4d891d07b0f9d3b44d8a01d4ed"
[1.8.x] Fixed #26204 -- Reallowed dashes in top-level domains for
URLValidator.

Thanks Shai Berger for the review.

Backport of b1afebf882db5296cd9dcea26ee66d5250922e53 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26204#comment:7>

Reply all
Reply to author
Forward
0 new messages