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.
* 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>
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>
* status: new => assigned
* owner: nobody => timgraham
* component: Uncategorized => Core (Other)
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/26204#comment:3>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/6123 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/26204#comment:4>
* 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>
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>
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>