1.6.10.txt 1.5 KB

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