1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed validation of email addresses when the local part contains an @.

See also BaseUserManager.normalize_email -- it uses rsplit.

Refs #4833.
This commit is contained in:
Aymeric Augustin
2013-01-26 12:19:31 +01:00
parent 58062a6302
commit 424eb67867
2 changed files with 2 additions and 1 deletions

View File

@@ -106,7 +106,7 @@ class EmailValidator(object):
if not value or '@' not in value:
raise ValidationError(self.message, code=self.code)
user_part, domain_part = value.split('@', 1)
user_part, domain_part = value.rsplit('@', 1)
if not self.user_regex.match(user_part):
raise ValidationError(self.message, code=self.code)