[Python-modules-team] Bug#814372: overly agressive URLField validation causes failures

LaMont Jones lamont at debian.org
Wed Feb 10 23:04:00 UTC 2016


Package: python3-django
Version: 1.8.7-1

If the django site lives somewhere that the admins have declared a bogus top-level domain, and chosen to use an rfc1035-conforming name (with a hyphen in the middle of it), then django URLField validation considers the domain to be invalid. (I suspect that IANA hasn't released any TLDs with hyphens yet - making them the ideal choice right now for "something that won't be real".)

That is to say: http://debian-mirror.my-tld/debian 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.

Please fix the validator to allow hyphens in the tld_re.

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

lamont



More information about the Python-modules-team mailing list