<feed xmlns='http://www.w3.org/2005/Atom'>
<title>django.git/django/utils/text.py, branch stable/5.2.x</title>
<subtitle>django
</subtitle>
<id>http://cgit.adnoto.dev/django.git/atom?h=stable%2F5.2.x</id>
<link rel='self' href='http://cgit.adnoto.dev/django.git/atom?h=stable%2F5.2.x'/>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/'/>
<updated>2026-02-25T16:12:17Z</updated>
<entry>
<title>[5.2.x] Fixed #36944 -- Removed MAX_LENGTH_HTML and related 5M chars limit references from HTML truncation docs.</title>
<updated>2026-02-25T16:12:17Z</updated>
<author>
<name>Natalia</name>
<email>124304+nessita@users.noreply.github.com</email>
</author>
<published>2026-02-25T13:37:38Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=703777cbbc268f62083c703fa27fa582b54bcc93'/>
<id>urn:sha1:703777cbbc268f62083c703fa27fa582b54bcc93</id>
<content type='text'>
Backport of bbc6818bc12f14c1764a7eb68556018195f56b59 from main.
</content>
</entry>
<entry>
<title>[5.2.x] Fixed CVE-2026-1285 -- Mitigated potential DoS in django.utils.text.Truncator for HTML input.</title>
<updated>2026-02-03T13:15:39Z</updated>
<author>
<name>Natalia</name>
<email>124304+nessita@users.noreply.github.com</email>
</author>
<published>2026-01-21T12:53:10Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=9f2ada875bbee62ac46032e38ddb22755d67ae5a'/>
<id>urn:sha1:9f2ada875bbee62ac46032e38ddb22755d67ae5a</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, and Jake Howard and Jacob Walls for
reviews.

Backport of a33540b3e20b5d759aa8b2e4b9ca0e8edd285344 from main.
</content>
</entry>
<entry>
<title>[5.2.x] Fixed #36341 -- Preserved whitespaces in wordwrap template filter.</title>
<updated>2025-04-23T19:18:55Z</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=305aa4d0c5507072fa3a1c2f03fba9559329b499'/>
<id>urn:sha1:305aa4d0c5507072fa3a1c2f03fba9559329b499</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>[5.2.x] Fixed CVE-2025-26699 -- Mitigated potential DoS in wordwrap template filter.</title>
<updated>2025-03-06T08:42:27Z</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=3cfa472644d4ce764d84fed739177b5765ea4b8a'/>
<id>urn:sha1:3cfa472644d4ce764d84fed739177b5765ea4b8a</id>
<content type='text'>
Thanks sw0rd1ight for the report.

Backport of 55d89e25f4115c5674cdd9b9bcba2bb2bb6d820b from main.
</content>
</entry>
<entry>
<title>Refs #30686 -- Removed unused regexes in django.utils.text.</title>
<updated>2024-02-15T07:39:14Z</updated>
<author>
<name>Mariusz Felisiak</name>
<email>felisiak.mariusz@gmail.com</email>
</author>
<published>2024-02-15T07:39:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=3cadeea077a98367a4ed344d645df0aff243de91'/>
<id>urn:sha1:3cadeea077a98367a4ed344d645df0aff243de91</id>
<content type='text'>
Unused since 6ee37ada3241ed263d8d1c2901b030d964cbd161.</content>
</entry>
<entry>
<title>Fixed #30686 -- Used Python HTMLParser in utils.text.Truncator.</title>
<updated>2024-02-07T08:46:25Z</updated>
<author>
<name>David Smith</name>
<email>smithdc@gmail.com</email>
</author>
<published>2023-01-03T20:48:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=6ee37ada3241ed263d8d1c2901b030d964cbd161'/>
<id>urn:sha1:6ee37ada3241ed263d8d1c2901b030d964cbd161</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refs #30686 -- Fixed text truncation for negative or zero lengths.</title>
<updated>2024-02-07T04:18:35Z</updated>
<author>
<name>David Smith</name>
<email>smithdc@gmail.com</email>
</author>
<published>2024-02-06T19:52:52Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=70f39e46f86b946c273340d52109824c776ffb4c'/>
<id>urn:sha1:70f39e46f86b946c273340d52109824c776ffb4c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed CVE-2023-43665 -- Mitigated potential DoS in django.utils.text.Truncator when truncating HTML text.</title>
<updated>2023-10-04T12:22:26Z</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=17b51094d778b421bb2b3aae0c270894b050455d'/>
<id>urn:sha1:17b51094d778b421bb2b3aae0c270894b050455d</id>
<content type='text'>
Thanks Wenchao Li of Alibaba Group for the report.
</content>
</entry>
<entry>
<title>Refs #30686 -- Moved add_truncation_text() helper to a module level.</title>
<updated>2023-07-14T08:17:14Z</updated>
<author>
<name>David Smith</name>
<email>smithdc@gmail.com</email>
</author>
<published>2023-06-23T05:40:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=6f1b8c00d8151059cc1902a92f067bbdc1673779'/>
<id>urn:sha1:6f1b8c00d8151059cc1902a92f067bbdc1673779</id>
<content type='text'>
</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>
</feed>
