Debian Codegraph @

docs/releases/5.1.9.txt

raw
1 ==========================
2 Django 5.1.9 release notes
3 ==========================
4
5 *May 7, 2025*
6
7 Django 5.1.9 fixes a security issue with severity "moderate", a data loss bug,
8 and a regression in 5.1.8.
9
10 This release was built using an upgraded :pypi:`setuptools`, producing
11 filenames compliant with :pep:`491` and :pep:`625` and thus addressing a PyPI
12 warning about non-compliant distribution filenames. This change only affects
13 the Django packaging process and does not impact Django's behavior.
14
15 CVE-2025-32873: Denial-of-service possibility in ``strip_tags()``
16 =================================================================
17
18 :func:`~django.utils.html.strip_tags` would be slow to evaluate certain inputs
19 containing large sequences of incomplete HTML tags. This function is used to
20 implement the :tfilter:`striptags` template filter, which was thus also
21 vulnerable.
22
23 :func:`~django.utils.html.strip_tags` now raises a :exc:`.SuspiciousOperation`
24 exception if it encounters an unusually large number of unclosed opening tags.
25
26 Bugfixes
27 ========
28
29 * Fixed a data corruption possibility in ``file_move_safe()`` when
30 ``allow_overwrite=True``, where leftover content from a previously larger
31 file could remain after overwriting with a smaller one due to lack of
32 truncation (:ticket:`36298`).
33
34 * Fixed a regression in Django 5.1.8, introduced when fixing :cve:`2025-26699`,
35 where the :tfilter:`wordwrap` template filter did not preserve empty lines
36 between paragraphs after wrapping text (:ticket:`36341`).