mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-26 12:43:09 +01:00
Make the email regexp less strict.
The former one disallowed too many valid address, eg. those containing quotes or square brackets.
This commit is contained in:
parent
7110b8f74e
commit
e54751f9c9
@ -40,8 +40,7 @@ import contextlib
|
|||||||
|
|
||||||
from .web import _ipAddr, _domain
|
from .web import _ipAddr, _domain
|
||||||
|
|
||||||
emailRe = re.compile(r"^(\w&.+-]+!)*[\w&.+-]+@(%s|%s)$" % (_domain, _ipAddr),
|
emailRe = re.compile(r"^\S+@(%s|%s)$" % (_domain, _ipAddr), re.I)
|
||||||
re.I)
|
|
||||||
|
|
||||||
def getAddressFromHostname(host, port=None, attempt=0):
|
def getAddressFromHostname(host, port=None, attempt=0):
|
||||||
addrinfo = socket.getaddrinfo(host, port)
|
addrinfo = socket.getaddrinfo(host, port)
|
||||||
|
Loading…
Reference in New Issue
Block a user