1.4.4.txt 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ==========================
  2. Django 1.4.4 release notes
  3. ==========================
  4. *February 19, 2013*
  5. Django 1.4.4 fixes four security issues present in previous Django releases in
  6. the 1.4 series, as well as several other bugs and numerous documentation
  7. improvements.
  8. This is the fourth bugfix/security release in the Django 1.4 series.
  9. Host header poisoning
  10. =====================
  11. Some parts of Django -- independent of end-user-written applications -- make
  12. use of full URLs, including domain name, which are generated from the HTTP Host
  13. header. Django's documentation has for some time contained notes advising users
  14. on how to configure Web servers to ensure that only valid Host headers can reach
  15. the Django application. However, it has been reported to us that even with the
  16. recommended Web server configurations there are still techniques available for
  17. tricking many common Web servers into supplying the application with an
  18. incorrect and possibly malicious Host header.
  19. For this reason, Django 1.4.4 adds a new setting, ``ALLOWED_HOSTS``, containing
  20. an explicit list of valid host/domain names for this site. A request with a
  21. Host header not matching an entry in this list will raise
  22. ``SuspiciousOperation`` if ``request.get_host()`` is called. For full details
  23. see the documentation for the :setting:`ALLOWED_HOSTS` setting.
  24. The default value for this setting in Django 1.4.4 is ``['*']`` (matching any
  25. host), for backwards-compatibility, but we strongly encourage all sites to set
  26. a more restrictive value.
  27. This host validation is disabled when ``DEBUG`` is ``True`` or when running tests.
  28. XML deserialization
  29. ===================
  30. The XML parser in the Python standard library is vulnerable to a number of
  31. attacks via external entities and entity expansion. Django uses this parser for
  32. deserializing XML-formatted database fixtures. This deserializer is not
  33. intended for use with untrusted data, but in order to err on the side of safety
  34. in Django 1.4.4 the XML deserializer refuses to parse an XML document with a
  35. DTD (DOCTYPE definition), which closes off these attack avenues.
  36. These issues in the Python standard library are CVE-2013-1664 and
  37. CVE-2013-1665. More information available `from the Python security team`_.
  38. Django's XML serializer does not create documents with a DTD, so this should
  39. not cause any issues with the typical round-trip from ``dumpdata`` to
  40. ``loaddata``, but if you feed your own XML documents to the ``loaddata``
  41. management command, you will need to ensure they do not contain a DTD.
  42. .. _from the Python security team: http://blog.python.org/2013/02/announcing-defusedxml-fixes-for-xml.html
  43. Formset memory exhaustion
  44. =========================
  45. Previous versions of Django did not validate or limit the form-count data
  46. provided by the client in a formset's management form, making it possible to
  47. exhaust a server's available memory by forcing it to create very large numbers
  48. of forms.
  49. In Django 1.4.4, all formsets have a strictly-enforced maximum number of forms
  50. (1000 by default, though it can be set higher via the ``max_num`` formset
  51. factory argument).
  52. Admin history view information leakage
  53. ======================================
  54. In previous versions of Django, an admin user without change permission on a
  55. model could still view the unicode representation of instances via their admin
  56. history log. Django 1.4.4 now limits the admin history log view for an object
  57. to users with change permission for that model.
  58. Other bugfixes and changes
  59. ==========================
  60. * Prevented transaction state from leaking from one request to the next (#19707).
  61. * Changed an SQL command syntax to be MySQL 4 compatible (#19702).
  62. * Added backwards-compatibility with old unsalted MD5 passwords (#18144).
  63. * Numerous documentation improvements and fixes.