1.5.2.txt 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. ==========================
  2. Django 1.5.2 release notes
  3. ==========================
  4. *August 13, 2013*
  5. This is Django 1.5.2, a bugfix and security release for Django 1.5.
  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()``, ``django.contrib.comments``, and
  10. :doc:`i18n </topics/i18n/index>`) to redirect the user to an "on success" URL.
  11. The security checks for these redirects (namely
  12. ``django.utils.http.is_safe_url()``) didn't check if the scheme is ``http(s)``
  13. and as such allowed ``javascript:...`` URLs to be entered. If a developer
  14. relied on ``is_safe_url()`` to provide safe redirect targets and put such a
  15. URL into a link, they could suffer from a XSS attack. This bug doesn't affect
  16. Django currently, since we only put this URL into the ``Location`` response
  17. header and browsers seem to ignore JavaScript there.
  18. XSS vulnerability in :mod:`django.contrib.admin`
  19. ================================================
  20. If a :class:`~django.db.models.URLField` is used in Django 1.5, it displays the
  21. current value of the field and a link to the target on the admin change page.
  22. The display routine of this widget was flawed and allowed for XSS.
  23. Bugfixes
  24. ========
  25. * Fixed a crash with :meth:`~django.db.models.query.QuerySet.prefetch_related`
  26. (#19607) as well as some ``pickle`` regressions with ``prefetch_related``
  27. (#20157 and #20257).
  28. * Fixed a regression in :mod:`django.contrib.gis` in the Google Map output on
  29. Python 3 (#20773).
  30. * Made ``DjangoTestSuiteRunner.setup_databases`` properly handle aliases for
  31. the default database (#19940) and prevented ``teardown_databases`` from
  32. attempting to tear down aliases (#20681).
  33. * Fixed the ``django.core.cache.backends.memcached.MemcachedCache`` backend's
  34. ``get_many()`` method on Python 3 (#20722).
  35. * Fixed :mod:`django.contrib.humanize` translation syntax errors. Affected
  36. languages: Mexican Spanish, Mongolian, Romanian, Turkish (#20695).
  37. * Added support for wheel packages (#19252).
  38. * The CSRF token now rotates when a user logs in.
  39. * Some Python 3 compatibility fixes including #20212 and #20025.
  40. * Fixed some rare cases where :meth:`~django.db.models.query.QuerySet.get`
  41. exceptions recursed infinitely (#20278).
  42. * :djadmin:`makemessages` no longer crashes with ``UnicodeDecodeError``
  43. (#20354).
  44. * Fixed ``geojson`` detection with SpatiaLite.
  45. * :meth:`~django.test.SimpleTestCase.assertContains` once again works with
  46. binary content (#20237).
  47. * Fixed :class:`~django.db.models.ManyToManyField` if it has a unicode ``name``
  48. parameter (#20207).
  49. * Ensured that the WSGI request's path is correctly based on the
  50. ``SCRIPT_NAME`` environment variable or the :setting:`FORCE_SCRIPT_NAME`
  51. setting, regardless of whether or not either has a trailing slash (#20169).
  52. * Fixed an obscure bug with the :func:`~django.test.override_settings`
  53. decorator. If you hit an ``AttributeError: 'Settings' object has no attribute
  54. '_original_allowed_hosts'`` exception, it's probably fixed (#20636).