From 4070d6ceb055c35ca610629bd8f9604c0e530cf5 Mon Sep 17 00:00:00 2001 From: Dennis Schwertel Date: Sun, 2 Feb 2020 11:15:42 +0100 Subject: [PATCH] Fixed #31267 -- Added tests cases with empty username or password for URLValidator. Follow up to cdcf4164bec9dc09465424d7042c3f9d4f0f1fdc. --- AUTHORS | 1 + tests/validators/invalid_urls.txt | 3 +++ tests/validators/valid_urls.txt | 8 ++++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index de8731b6aac..8b90f9c028c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -247,6 +247,7 @@ answer newbie questions, and generally made Django that much better: Davide Ceretti Deepak Thukral Denis Kuzmichyov + Dennis Schwertel Derek Willis Deric Crago deric@monowerks.com diff --git a/tests/validators/invalid_urls.txt b/tests/validators/invalid_urls.txt index 4a092034ff6..3a92bbb9b4a 100644 --- a/tests/validators/invalid_urls.txt +++ b/tests/validators/invalid_urls.txt @@ -57,6 +57,9 @@ http://example.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa. http://example.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa http://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaa https://test.[com +http://@example.com +http://:@example.com +http://:bar@example.com http://foo@bar@example.com http://foo/bar@example.com http://foo:bar:baz@example.com diff --git a/tests/validators/valid_urls.txt b/tests/validators/valid_urls.txt index f79f9481429..a3db587492e 100644 --- a/tests/validators/valid_urls.txt +++ b/tests/validators/valid_urls.txt @@ -23,14 +23,18 @@ http://foo.com/blah_blah_(wikipedia)_(again) http://www.example.com/wpstyle/?p=364 https://www.example.com/foo/?bar=baz&inga=42&quux http://✪df.ws/123 -http://userid:password@example.com:8080 -http://userid:password@example.com:8080/ http://userid@example.com http://userid@example.com/ http://userid@example.com:8080 http://userid@example.com:8080/ +http://userid:@example.com +http://userid:@example.com/ +http://userid:@example.com:8080 +http://userid:@example.com:8080/ http://userid:password@example.com http://userid:password@example.com/ +http://userid:password@example.com:8080 +http://userid:password@example.com:8080/ http://142.42.1.1/ http://142.42.1.1:8080/ http://➡.ws/䨹