From 540de2f7972c6aa68fbf36c6a0da137d768f2067 Mon Sep 17 00:00:00 2001 From: Dheerendra Rathor Date: Wed, 28 Oct 2015 12:24:57 +0530 Subject: [PATCH] [1.8.x] Fixed #25620 -- Made URLValidator prohibit URLs with consecutive dots in the domain section. Backport of 96fe90f5356971e0e51a0bc41e045dde600d7521 from master --- django/core/validators.py | 2 +- docs/releases/1.8.6.txt | 4 ++++ tests/validators/invalid_urls.txt | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/django/core/validators.py b/django/core/validators.py index cd5b16b207c..89d184f1340 100644 --- a/django/core/validators.py +++ b/django/core/validators.py @@ -73,7 +73,7 @@ class URLValidator(RegexValidator): # Host patterns hostname_re = r'[a-z' + ul + r'0-9](?:[a-z' + ul + r'0-9-]*[a-z' + ul + r'0-9])?' - domain_re = r'(?:\.(?!-)[a-z' + ul + r'0-9-]*(?