We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0adbbe1 commit e514826Copy full SHA for e514826
tests/test_uri_validate.py
@@ -31,3 +31,11 @@ def test_is_absolute_uri(self):
31
self.assertIsNone(is_absolute_uri('wrong'))
32
self.assertIsNone(is_absolute_uri('http://[:1]:38432/path'))
33
self.assertIsNone(is_absolute_uri('http://[abcd:efgh::1]/'))
34
+
35
+ def test_recursive_regex(self):
36
+ from datetime import datetime
37
+ t0 = datetime.now()
38
+ self.assertIsNone(is_absolute_uri('http://[::::::::::::::::::::::::::]/path'))
39
+ t1 = datetime.now()
40
+ spent = t1 - t0
41
+ self.assertGreater(0.1, spent.total_seconds(), "possible recursive loop detected")
0 commit comments