1.6.11.txt 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ===========================
  2. Django 1.6.11 release notes
  3. ===========================
  4. *March 18, 2015*
  5. Django 1.6.11 fixes two security issues in 1.6.10.
  6. Denial-of-service possibility with ``strip_tags()``
  7. ===================================================
  8. Last year :func:`~django.utils.html.strip_tags` was changed to work
  9. iteratively. The problem is that the size of the input it's processing can
  10. increase on each iteration which results in an infinite loop in
  11. ``strip_tags()``. This issue only affects versions of Python that haven't
  12. received `a bugfix in HTMLParser <https://bugs.python.org/issue20288>`_; namely
  13. Python < 2.7.7 and 3.3.5. Some operating system vendors have also backported
  14. the fix for the Python bug into their packages of earlier versions.
  15. To remedy this issue, ``strip_tags()`` will now return the original input if
  16. it detects the length of the string it's processing increases. Remember that
  17. absolutely NO guarantee is provided about the results of ``strip_tags()`` being
  18. HTML safe. So NEVER mark safe the result of a ``strip_tags()`` call without
  19. escaping it first, for example with :func:`~django.utils.html.escape`.
  20. Mitigated possible XSS attack via user-supplied redirect URLs
  21. =============================================================
  22. Django relies on user input in some cases (e.g.
  23. :func:`django.contrib.auth.views.login` and :doc:`i18n </topics/i18n/index>`)
  24. to redirect the user to an "on success" URL. The security checks for these
  25. redirects (namely ``django.utils.http.is_safe_url()``) accepted URLs with
  26. leading control characters and so considered URLs like ``\x08javascript:...``
  27. safe. This issue doesn't affect Django currently, since we only put this URL
  28. into the ``Location`` response header and browsers seem to ignore JavaScript
  29. there. Browsers we tested also treat URLs prefixed with control characters such
  30. as ``%08//example.com`` as relative paths so redirection to an unsafe target
  31. isn't a problem either.
  32. However, if a developer relies on ``is_safe_url()`` to
  33. provide safe redirect targets and puts such a URL into a link, they could
  34. suffer from an XSS attack as some browsers such as Google Chrome ignore control
  35. characters at the start of a URL in an anchor ``href``.