Commit 70e4e7f7 authored by Jonas Platte's avatar Jonas Platte

Fixed validate_email not accepting catchalls (empty local part of the address)

parent fb357dee
......@@ -20,7 +20,7 @@ def validate_email(email, strict):
# these characters are permitted in email address.
ATEXT = r'[\w!#$%&\'\*\+\-/=\?\^`\{\|\}~]' # see 3.2.4
DOT_ATOM_TEXT = ATEXT + r'+(?:\.' + ATEXT + r'+)*' # see 3.2.4
DOT_ATOM_TEXT = ATEXT + r'*(?:\.' + ATEXT + r'+)*' # see 3.2.4
DOT_ATOM_TEXT2 = ATEXT + r'+(?:\.' + ATEXT + r'+)+' # as above, but with a "+" since the host part must be under some TLD
ADDR_SPEC = '^%s@%s$' % (DOT_ATOM_TEXT, DOT_ATOM_TEXT2) # see 3.4.1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment