mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed CVE-2019-14233 -- Prevented excessive HTMLParser recursion in strip_tags() when handling incomplete HTML entities.
Thanks to Guido Vranken for initial report.
This commit is contained in:
committed by
Carlton Gibson
parent
7f65974f82
commit
4b78420d25
@@ -90,6 +90,8 @@ class TestUtilsHtml(SimpleTestCase):
|
||||
('&gotcha&#;<>', '&gotcha&#;<>'),
|
||||
('<sc<!-- -->ript>test<<!-- -->/script>', 'ript>test'),
|
||||
('<script>alert()</script>&h', 'alert()h'),
|
||||
('><!' + ('&' * 16000) + 'D', '><!' + ('&' * 16000) + 'D'),
|
||||
('X<<<<br>br>br>br>X', 'XX'),
|
||||
)
|
||||
for value, output in items:
|
||||
with self.subTest(value=value, output=output):
|
||||
|
||||
Reference in New Issue
Block a user