4.2.6.txt 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ==========================
  2. Django 4.2.6 release notes
  3. ==========================
  4. *October 4, 2023*
  5. Django 4.2.6 fixes a security issue with severity "moderate" and several bugs
  6. in 4.2.5.
  7. CVE-2023-43665: Denial-of-service possibility in ``django.utils.text.Truncator``
  8. ================================================================================
  9. Following the fix for :cve:`2019-14232`, the regular expressions used in the
  10. implementation of ``django.utils.text.Truncator``'s ``chars()`` and ``words()``
  11. methods (with ``html=True``) were revised and improved. However, these regular
  12. expressions still exhibited linear backtracking complexity, so when given a
  13. very long, potentially malformed HTML input, the evaluation would still be
  14. slow, leading to a potential denial of service vulnerability.
  15. The ``chars()`` and ``words()`` methods are used to implement the
  16. :tfilter:`truncatechars_html` and :tfilter:`truncatewords_html` template
  17. filters, which were thus also vulnerable.
  18. The input processed by ``Truncator``, when operating in HTML mode, has been
  19. limited to the first five million characters in order to avoid potential
  20. performance and memory issues.
  21. Bugfixes
  22. ========
  23. * Fixed a regression in Django 4.2.5 where overriding the deprecated
  24. ``DEFAULT_FILE_STORAGE`` and ``STATICFILES_STORAGE`` settings in tests caused
  25. the main ``STORAGES`` to mutate (:ticket:`34821`).
  26. * Fixed a regression in Django 4.2 that caused unnecessary casting of string
  27. based fields (``CharField``, ``EmailField``, ``TextField``, ``CICharField``,
  28. ``CIEmailField``, and ``CITextField``) used with the ``__isnull`` lookup on
  29. PostgreSQL. As a consequence, the pre-Django 4.2 indexes didn't match and
  30. were not used by the query planner (:ticket:`34840`).
  31. You may need to recreate indexes propagated to the database with Django
  32. 4.2 - 4.2.5 as they contain unnecessary ``::text`` casting that is avoided as
  33. of this release.