<feed xmlns='http://www.w3.org/2005/Atom'>
<title>django.git/tests/utils_tests/test_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 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>Refs #33476 -- Refactored code to strictly match 88 characters line length.</title>
<updated>2022-02-07T19:37:05Z</updated>
<author>
<name>Mariusz Felisiak</name>
<email>felisiak.mariusz@gmail.com</email>
</author>
<published>2022-02-04T07:08:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=7119f40c9881666b6f9b5cf7df09ee1d21cc8344'/>
<id>urn:sha1:7119f40c9881666b6f9b5cf7df09ee1d21cc8344</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>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>Added test for ValueErrors in unescape_string_literal().</title>
<updated>2021-12-14T19:18:43Z</updated>
<author>
<name>Florian Apolloner</name>
<email>florian@apolloner.eu</email>
</author>
<published>2021-12-14T19:16:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=5d9c512e5b42e1c686300c214453bf0b820d7326'/>
<id>urn:sha1:5d9c512e5b42e1c686300c214453bf0b820d7326</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed CVE-2021-31542 -- Tightened path &amp; file name sanitation in file uploads.</title>
<updated>2021-05-04T06:44:42Z</updated>
<author>
<name>Florian Apolloner</name>
<email>florian@apolloner.eu</email>
</author>
<published>2021-04-14T16:23:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=0b79eb36915d178aef5c6a7bbce71b1e76d376d3'/>
<id>urn:sha1:0b79eb36915d178aef5c6a7bbce71b1e76d376d3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refs #27753 -- Removed django.utils.text.unescape_entities() per deprecation timeline.</title>
<updated>2021-01-14T16:50:04Z</updated>
<author>
<name>Mariusz Felisiak</name>
<email>felisiak.mariusz@gmail.com</email>
</author>
<published>2021-01-07T07:09:04Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=157ab32f3446da7fa1f9d716509c290069a2a156'/>
<id>urn:sha1:157ab32f3446da7fa1f9d716509c290069a2a156</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refs #27804 -- Used subTest() in tests.utils_tests.test_text.</title>
<updated>2020-06-04T09:16:21Z</updated>
<author>
<name>Jon Dufresne</name>
<email>jon.dufresne@gmail.com</email>
</author>
<published>2020-06-04T09:16:21Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=f47d5aac622c334ebeba06b7460204aeb98661e2'/>
<id>urn:sha1:f47d5aac622c334ebeba06b7460204aeb98661e2</id>
<content type='text'>
</content>
</entry>
</feed>
