2.2.4.txt 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. ==========================
  2. Django 2.2.4 release notes
  3. ==========================
  4. *August 1, 2019*
  5. Django 2.2.4 fixes security issues and several bugs in 2.2.3.
  6. CVE-2019-14232: Denial-of-service possibility in ``django.utils.text.Truncator``
  7. ================================================================================
  8. If ``django.utils.text.Truncator``'s ``chars()`` and ``words()`` methods
  9. were passed the ``html=True`` argument, they were extremely slow to evaluate
  10. certain inputs due to a catastrophic backtracking vulnerability in a regular
  11. expression. The ``chars()`` and ``words()`` methods are used to implement the
  12. :tfilter:`truncatechars_html` and :tfilter:`truncatewords_html` template
  13. filters, which were thus vulnerable.
  14. The regular expressions used by ``Truncator`` have been simplified in order to
  15. avoid potential backtracking issues. As a consequence, trailing punctuation may
  16. now at times be included in the truncated output.
  17. CVE-2019-14233: Denial-of-service possibility in ``strip_tags()``
  18. =================================================================
  19. Due to the behavior of the underlying ``HTMLParser``,
  20. :func:`django.utils.html.strip_tags` would be extremely slow to evaluate
  21. certain inputs containing large sequences of nested incomplete HTML entities.
  22. The ``strip_tags()`` method is used to implement the corresponding
  23. :tfilter:`striptags` template filter, which was thus also vulnerable.
  24. ``strip_tags()`` now avoids recursive calls to ``HTMLParser`` when progress
  25. removing tags, but necessarily incomplete HTML entities, stops being made.
  26. Remember that absolutely NO guarantee is provided about the results of
  27. ``strip_tags()`` being HTML safe. So NEVER mark safe the result of a
  28. ``strip_tags()`` call without escaping it first, for example with
  29. :func:`django.utils.html.escape`.
  30. CVE-2019-14234: SQL injection possibility in key and index lookups for ``JSONField``/``HStoreField``
  31. ====================================================================================================
  32. :lookup:`Key and index lookups <jsonfield.key>` for
  33. ``django.contrib.postgres.fields.JSONField`` and :lookup:`key lookups
  34. <hstorefield.key>` for :class:`~django.contrib.postgres.fields.HStoreField`
  35. were subject to SQL injection, using a suitably crafted dictionary, with
  36. dictionary expansion, as the ``**kwargs`` passed to ``QuerySet.filter()``.
  37. CVE-2019-14235: Potential memory exhaustion in ``django.utils.encoding.uri_to_iri()``
  38. =====================================================================================
  39. If passed certain inputs, :func:`django.utils.encoding.uri_to_iri` could lead
  40. to significant memory usage due to excessive recursion when re-percent-encoding
  41. invalid UTF-8 octet sequences.
  42. ``uri_to_iri()`` now avoids recursion when re-percent-encoding invalid UTF-8
  43. octet sequences.
  44. Bugfixes
  45. ========
  46. * Fixed a regression in Django 2.2 when ordering a ``QuerySet.union()``,
  47. ``intersection()``, or ``difference()`` by a field type present more than
  48. once results in the wrong ordering being used (:ticket:`30628`).
  49. * Fixed a migration crash on PostgreSQL when adding a check constraint
  50. with a ``contains`` lookup on
  51. :class:`~django.contrib.postgres.fields.DateRangeField` or
  52. :class:`~django.contrib.postgres.fields.DateTimeRangeField`, if the right
  53. hand side of an expression is the same type (:ticket:`30621`).
  54. * Fixed a regression in Django 2.2 where auto-reloader crashes if a file path
  55. contains nulls characters (``'\x00'``) (:ticket:`30506`).
  56. * Fixed a regression in Django 2.2 where auto-reloader crashes if a translation
  57. directory cannot be resolved (:ticket:`30647`).