1.3.6.txt 3.3 KB

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