← Back to team overview

group.of.nepali.translators team mailing list archive

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

 

It looks like this fix did not go out in xenial due to the verification not being performed:
  https://launchpad.net/ubuntu/+source/python-django/1.8.7-1ubuntu5.4

Xenial reached its end of standard support, so if this fix is still
desired it should be pursued under extended support.

** Changed in: python-django (Ubuntu Xenial)
       Status: Fix Committed => Won't Fix

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1611923

Title:
  http.request does not support ipv6-formatted ipv4 addresses

Status in Django:
  Unknown
Status in python-django package in Ubuntu:
  Fix Released
Status in python-django source package in Xenial:
  Won't Fix

Bug description:
  SRU Template

  [Impact]

    * django-python is unable to use ipv6 formatted ipv4 addresses.
  For example, Addresses of the form "::ffff:169.254.169.254" are perfectly valid, but not supported. This package is a dependency of maas and openstack among others, thus will limit deployments.

    * The upstream fix is available, simple, and provides an updated
  testcase to cover and regress-test.

  [Test Case]

   * The updated unit test case is probably the simplest way to verify.
   * See tests/README.rst: Updated test case will fail without the accompanied fix.

   $ PYTHONPATH=..:$PYTHONPATH ./runtests.py requests
   Testing against Django installed in '/home/jgrimm/work/sru/django-python/python-django-1.8.7/django'
  Creating test database for alias 'default'...
  Creating test database for alias 'other'...
  ...........................................
  ----------------------------------------------------------------------
   PYTHONPATH=..:$PYTHONPATH ./runtests.py requests
  Testing against Django installed in '/home/jgrimm/work/sru/django-python/python-django-1.8.7/django'
  Creating test database for alias 'default'...
  Creating test database for alias 'other'...
  ...........................................
  ----------------------------------------------------------------------
  Ran 43 tests in 0.016s
  OK

  [Regression Potential]

   * Low potential for regression as validation regex becomes more permissive.
   * Full unit test additionally run to ensure no new failures.

  [Other Info]

   * Backported from upstream with no modifications required.

  -- original bug description --

  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):

To manage notifications about this bug go to:
https://bugs.launchpad.net/django/+bug/1611923/+subscriptions