<feed xmlns='http://www.w3.org/2005/Atom'>
<title>django.git/django/utils/text.py, branch stable/4.2.x</title>
<subtitle>django
</subtitle>
<id>http://cgit.adnoto.dev/django.git/atom?h=stable%2F4.2.x</id>
<link rel='self' href='http://cgit.adnoto.dev/django.git/atom?h=stable%2F4.2.x'/>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/'/>
<updated>2026-02-03T13:25:31Z</updated>
<entry>
<title>[4.2.x] Fixed CVE-2026-1285 -- Mitigated potential DoS in django.utils.text.Truncator for HTML input.</title>
<updated>2026-02-03T13:25:31Z</updated>
<author>
<name>Natalia</name>
<email>124304+nessita@users.noreply.github.com</email>
</author>
<published>2026-01-21T18:24:55Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=b40cfc6052ced26dcd8166a58ea6f841d0d2cac8'/>
<id>urn:sha1:b40cfc6052ced26dcd8166a58ea6f841d0d2cac8</id>
<content type='text'>
The `TruncateHTMLParser` used `deque.remove()` to remove tags from the
stack when processing end tags. With crafted input containing many
unmatched end tags, this caused repeated full scans of the tag stack,
leading to quadratic time complexity.

The fix uses LIFO semantics, only removing a tag from the stack when it
matches the most recently opened tag. This avoids linear scans for
unmatched end tags and reduces complexity to linear time.

Refs #30686 and 6ee37ada3241ed263d8d1c2901b030d964cbd161.

Thanks Seokchan Yoon for the report.

Backport of a33540b3e20b5d759aa8b2e4b9ca0e8edd285344 from main.
</content>
</entry>
<entry>
<title>[4.2.x] Fixed #36341 -- Preserved whitespaces in wordwrap template filter.</title>
<updated>2025-04-23T20:33:02Z</updated>
<author>
<name>Matti Pohjanvirta</name>
<email>matti.pohjanvirta@iki.fi</email>
</author>
<published>2025-04-20T15:22:51Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=e61e3daaf037507211028494d61f24382be31e5a'/>
<id>urn:sha1:e61e3daaf037507211028494d61f24382be31e5a</id>
<content type='text'>
Regression in 55d89e25f4115c5674cdd9b9bcba2bb2bb6d820b.

This work improves the django.utils.text.wrap() function to ensure that
empty lines and lines with whitespace only are kept instead of being
dropped.

Thanks Matti Pohjanvirta for the report and fix.

Co-authored-by: Natalia &lt;124304+nessita@users.noreply.github.com&gt;

Backport of 1e9db35836d42a3c72f3d1015c2f302eb6fee046 from main.
</content>
</entry>
<entry>
<title>[4.2.x] Fixed CVE-2025-26699 -- Mitigated potential DoS in wordwrap template filter.</title>
<updated>2025-03-06T09:01:44Z</updated>
<author>
<name>Sarah Boyce</name>
<email>42296566+sarahboyce@users.noreply.github.com</email>
</author>
<published>2025-02-25T08:40:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=e88f7376fe68dbf4ebaf11fad1513ce700b45860'/>
<id>urn:sha1:e88f7376fe68dbf4ebaf11fad1513ce700b45860</id>
<content type='text'>
Thanks sw0rd1ight for the report.

Backport of 55d89e25f4115c5674cdd9b9bcba2bb2bb6d820b from main.
</content>
</entry>
<entry>
<title>[4.2.x] Fixed CVE-2024-27351 -- Prevented potential ReDoS in Truncator.words().</title>
<updated>2024-03-04T07:36:56Z</updated>
<author>
<name>Shai Berger</name>
<email>shai@platonix.com</email>
</author>
<published>2024-02-19T12:56:37Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=3c9a2771cc80821e041b16eb36c1c37af5349d4a'/>
<id>urn:sha1:3c9a2771cc80821e041b16eb36c1c37af5349d4a</id>
<content type='text'>
Thanks Seokchan Yoon for the report.

Co-Authored-By: Mariusz Felisiak &lt;felisiak.mariusz@gmail.com&gt;
</content>
</entry>
<entry>
<title>[4.2.x] Fixed CVE-2023-43665 -- Mitigated potential DoS in django.utils.text.Truncator when truncating HTML text.</title>
<updated>2023-10-04T12:39:49Z</updated>
<author>
<name>Natalia</name>
<email>124304+nessita@users.noreply.github.com</email>
</author>
<published>2023-09-19T12:51:48Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=be9c27c4d18c2e6a5be8af4e53c0797440794473'/>
<id>urn:sha1:be9c27c4d18c2e6a5be8af4e53c0797440794473</id>
<content type='text'>
Thanks Wenchao Li of Alibaba Group for the report.
</content>
</entry>
<entry>
<title>Fixed #34170 -- Implemented Heal The Breach (HTB) in GzipMiddleware.</title>
<updated>2022-12-17T07:46:37Z</updated>
<author>
<name>Andreas Pelme</name>
<email>andreas@pelme.se</email>
</author>
<published>2022-11-20T20:46:55Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=ab7a85ac297464df82d8363455609979ca3603db'/>
<id>urn:sha1:ab7a85ac297464df82d8363455609979ca3603db</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refs #33476 -- Reformatted code with Black.</title>
<updated>2022-02-07T19:37:05Z</updated>
<author>
<name>django-bot</name>
<email>ops@djangoproject.com</email>
</author>
<published>2022-02-03T19:24:19Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=9c19aff7c7561e3a82978a272ecdaad40dda5c00'/>
<id>urn:sha1:9c19aff7c7561e3a82978a272ecdaad40dda5c00</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refs #27753 -- Removed unused django.utils.text._replace_entity() and _entity_re.</title>
<updated>2021-12-30T12:19:25Z</updated>
<author>
<name>Mariusz Felisiak</name>
<email>felisiak.mariusz@gmail.com</email>
</author>
<published>2021-12-30T12:19:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=a21a63cc288ba51bcf8c227a49de6f5bb9a72cc3'/>
<id>urn:sha1:a21a63cc288ba51bcf8c227a49de6f5bb9a72cc3</id>
<content type='text'>
Unused since 157ab32f3446da7fa1f9d716509c290069a2a156.</content>
</entry>
<entry>
<title>Fixed unescape_string_literal() crash on empty strings.</title>
<updated>2021-12-14T19:19:44Z</updated>
<author>
<name>Florian Apolloner</name>
<email>florian@apolloner.eu</email>
</author>
<published>2021-12-14T11:38:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=e1d673c373a7d032060872b690a92fc95496612e'/>
<id>urn:sha1:e1d673c373a7d032060872b690a92fc95496612e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed #32859 -- Simplified compress_string() by using gzip.compress().</title>
<updated>2021-06-21T11:19:11Z</updated>
<author>
<name>Illia Volochii</name>
<email>illia.volochii@gmail.com</email>
</author>
<published>2021-06-17T16:36:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=5a468b4c085900ba28b7f8dfa2cb0b50d7699aa6'/>
<id>urn:sha1:5a468b4c085900ba28b7f8dfa2cb0b50d7699aa6</id>
<content type='text'>
</content>
</entry>
</feed>
