1.4.20.txt 1.2 KB

1234567891011121314151617181920212223242526
  1. ===========================
  2. Django 1.4.20 release notes
  3. ===========================
  4. *March 18, 2015*
  5. Django 1.4.20 fixes one security issue in 1.4.19.
  6. Mitigated possible XSS attack via user-supplied redirect URLs
  7. =============================================================
  8. Django relies on user input in some cases (e.g.
  9. ``django.contrib.auth.views.login()`` and :doc:`i18n </topics/i18n/index>`)
  10. to redirect the user to an "on success" URL. The security checks for these
  11. redirects (namely ``django.utils.http.is_safe_url()``) accepted URLs with
  12. leading control characters and so considered URLs like ``\x08javascript:...``
  13. safe. This issue doesn't affect Django currently, since we only put this URL
  14. into the ``Location`` response header and browsers seem to ignore JavaScript
  15. there. Browsers we tested also treat URLs prefixed with control characters such
  16. as ``%08//example.com`` as relative paths so redirection to an unsafe target
  17. isn't a problem either.
  18. However, if a developer relies on ``is_safe_url()`` to
  19. provide safe redirect targets and puts such a URL into a link, they could
  20. suffer from an XSS attack as some browsers such as Google Chrome ignore control
  21. characters at the start of a URL in an anchor ``href``.