mirror of
https://github.com/django/django.git
synced 2025-08-19 02:01:29 +00:00
[1.8.x] Fixed catastrophic backtracking in URLValidator.
Thanks João Silva for reporting the problem and Tim Graham for finding the problematic RE and for review. This is a security fix; disclosure to follow shortly.
This commit is contained in:
parent
574dd5e0b0
commit
8f9a4d3a2b
5 changed files with 14 additions and 1 deletions
|
@ -172,6 +172,9 @@ TEST_DATA = [
|
|||
# Trailing newlines not accepted
|
||||
(URLValidator(), 'http://www.djangoproject.com/\n', ValidationError),
|
||||
(URLValidator(), 'http://[::ffff:192.9.5.5]\n', ValidationError),
|
||||
# Trailing junk does not take forever to reject
|
||||
(URLValidator(), 'http://www.asdasdasdasdsadfm.com.br ', ValidationError),
|
||||
(URLValidator(), 'http://www.asdasdasdasdsadfm.com.br z', ValidationError),
|
||||
|
||||
(BaseValidator(True), True, None),
|
||||
(BaseValidator(True), False, ValidationError),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue