1.4.18.txt 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. ===========================
  2. Django 1.4.18 release notes
  3. ===========================
  4. *Under development*
  5. Django 1.4.18 fixes several security issues in 1.4.17 as well as a regression
  6. on Python 2.5 in the 1.4.17 release.
  7. WSGI header spoofing via underscore/dash conflation
  8. ===================================================
  9. When HTTP headers are placed into the WSGI environ, they are normalized by
  10. converting to uppercase, converting all dashes to underscores, and prepending
  11. `HTTP_`. For instance, a header ``X-Auth-User`` would become
  12. ``HTTP_X_AUTH_USER`` in the WSGI environ (and thus also in Django's
  13. ``request.META`` dictionary).
  14. Unfortunately, this means that the WSGI environ cannot distinguish between
  15. headers containing dashes and headers containing underscores: ``X-Auth-User``
  16. and ``X-Auth_User`` both become ``HTTP_X_AUTH_USER``. This means that if a
  17. header is used in a security-sensitive way (for instance, passing
  18. authentication information along from a front-end proxy), even if the proxy
  19. carefully strips any incoming value for ``X-Auth-User``, an attacker may be
  20. able to provide an ``X-Auth_User`` header (with underscore) and bypass this
  21. protection.
  22. In order to prevent such attacks, both Nginx and Apache 2.4+ strip all headers
  23. containing underscores from incoming requests by default. Django's built-in
  24. development server now does the same. Django's development server is not
  25. recommended for production use, but matching the behavior of common production
  26. servers reduces the surface area for behavior changes during deployment.
  27. Bugfixes
  28. ========
  29. * To maintain compatibility with Python 2.5, Django's vendored version of six,
  30. :mod:`django.utils.six`, has been downgraded to 1.8.0 which is the last
  31. version to support Python 2.5.