diff options
| author | Tim Graham <timograham@gmail.com> | 2013-10-23 12:13:17 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-10-23 12:22:14 -0400 |
| commit | 4cfbde71a33973cb8c8da406b2523dfc742358e7 (patch) | |
| tree | be2a362fe0b96634cd0b8a8aebfe30b085b4b36f /django | |
| parent | efb05978b36ef6eeb02f47b7c58b138d089d581a (diff) | |
Fixed #12027 -- Fixed EmailValidator to reject a trailing dot.
Thanks Klas H for the report and claudep for the patch.
Diffstat (limited to 'django')
| -rw-r--r-- | django/core/validators.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/validators.py b/django/core/validators.py index 796c57e4b0..cf5ec7aa77 100644 --- a/django/core/validators.py +++ b/django/core/validators.py @@ -89,7 +89,7 @@ class EmailValidator(object): r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\011\013\014\016-\177])*"$)', # quoted-string re.IGNORECASE) domain_regex = re.compile( - r'(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}|[A-Z0-9-]{2,})\.?$' # domain + r'(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}|[A-Z0-9-]{2,})$' # domain # literal form, ipv4 address (SMTP 4.1.3) r'|^\[(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}\]$', re.IGNORECASE) |
