mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
[5.1.x] Fixed CVE-2024-38875 -- Mitigated potential DoS in urlize and urlizetrunc template filters.
Thank you to Elias Myllymäki for the report. Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
This commit is contained in:
@@ -352,6 +352,13 @@ class TestUtilsHtml(SimpleTestCase):
|
||||
"foo@.example.com",
|
||||
"foo@localhost",
|
||||
"foo@localhost.",
|
||||
# trim_punctuation catastrophic tests
|
||||
"(" * 100_000 + ":" + ")" * 100_000,
|
||||
"(" * 100_000 + "&:" + ")" * 100_000,
|
||||
"([" * 100_000 + ":" + "])" * 100_000,
|
||||
"[(" * 100_000 + ":" + ")]" * 100_000,
|
||||
"([[" * 100_000 + ":" + "]])" * 100_000,
|
||||
"&:" + ";" * 100_000,
|
||||
)
|
||||
for value in tests:
|
||||
with self.subTest(value=value):
|
||||
|
||||
Reference in New Issue
Block a user