1.4.2.txt 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. ==========================
  2. Django 1.4.2 release notes
  3. ==========================
  4. *October 17, 2012*
  5. This is the second security release in the Django 1.4 series.
  6. Host header poisoning
  7. ---------------------
  8. Some parts of Django -- independent of end-user-written applications -- make
  9. use of full URLs, including domain name, which are generated from the HTTP Host
  10. header. Some attacks against this are beyond Django's ability to control, and
  11. require the web server to be properly configured; Django's documentation has
  12. for some time contained notes advising users on such configuration.
  13. Django's own built-in parsing of the Host header is, however, still vulnerable,
  14. as was reported to us recently. The Host header parsing in Django 1.3.3 and
  15. Django 1.4.1 -- specifically, ``django.http.HttpRequest.get_host()`` -- was
  16. incorrectly handling username/password information in the header. Thus, for
  17. example, the following Host header would be accepted by Django when running on
  18. "validsite.com"::
  19. Host: validsite.com:random@evilsite.com
  20. Using this, an attacker can cause parts of Django -- particularly the
  21. password-reset mechanism -- to generate and display arbitrary URLs to users.
  22. To remedy this, the parsing in ``HttpRequest.get_host()`` is being modified;
  23. Host headers which contain potentially dangerous content (such as
  24. username/password pairs) now raise the exception
  25. :exc:`django.core.exceptions.SuspiciousOperation`.
  26. Details of this issue were initially posted online as a `security advisory`_.
  27. .. _security advisory: https://www.djangoproject.com/weblog/2012/oct/17/security/
  28. Backwards incompatible changes
  29. ==============================
  30. * The newly introduced :class:`~django.db.models.GenericIPAddressField`
  31. constructor arguments have been adapted to match those of all other model
  32. fields. The first two keyword arguments are now verbose_name and name.
  33. Other bugfixes and changes
  34. ==========================
  35. * Subclass HTMLParser only for appropriate Python versions (#18239).
  36. * Added batch_size argument to qs.bulk_create() (#17788).
  37. * Fixed a small regression in the admin filters where wrongly formatted dates passed as url parameters caused an unhandled ValidationError (#18530).
  38. * Fixed an endless loop bug when accessing permissions in templates (#18979)
  39. * Fixed some Python 2.5 compatibility issues
  40. * Fixed an issue with quoted filenames in Content-Disposition header (#19006)
  41. * Made the context option in ``trans`` and ``blocktrans`` tags accept literals wrapped in single quotes (#18881).
  42. * Numerous documentation improvements and fixes.