[Bug 1611923] [NEW] http.request does not support ipv6-formatted ipv4 addresses

Launchpad Bug Tracker 1611923 at bugs.launchpad.net
Fri Sep 16 05:46:46 UTC 2016


You have been subscribed to a public bug by Jon Grimm (jgrimm):

Addresses of the form "::ffff:169.254.169.254" are perfectly valid, but
not supported by django's http.request.

The following diff addresses the problem.

--- django/http/request.py      2015-11-24 10:21:15.000000000 -0700
+++ django/http/request.py.new  2016-08-10 13:12:17.459998895 -0600
@@ -23,7 +23,7 @@
 )
 
 RAISE_ERROR = object()
-host_validation_re = re.compile(r"^([a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9:]+\])(:\d+)?$")
+host_validation_re = re.compile(r"^([a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9\.:]+\])(:\d+)?$")
 
 
 class UnreadablePostError(IOError):

** Affects: django
     Importance: Unknown
         Status: Unknown

** Affects: python-django (Ubuntu)
     Importance: Medium
     Assignee: Jon Grimm (jgrimm)
         Status: In Progress


** Tags: bitesize patch
-- 
http.request does not support ipv6-formatted ipv4 addresses
https://bugs.launchpad.net/bugs/1611923
You received this bug notification because you are a member of Ubuntu Sponsors Team, which is subscribed to the bug report.



More information about the Ubuntu-sponsors mailing list