Skip to content
Snippets Groups Projects
Commit 24e0cc10 authored by Pavel Kácha's avatar Pavel Kácha
Browse files

Allow more emails within requestor field

parent bbb948e7
No related branches found
No related tags found
No related merge requests found
......@@ -1339,9 +1339,10 @@ def modify_client(**kwargs):
return allowed.match(nsid)
def isValidEmail(mail):
split = email.utils.parseaddr(mail)
mails = (email.utils.parseaddr(m) for m in mail.split(","))
allowed = re.compile("^[a-zA-Z0-9_.%!+-]+@[a-zA-Z0-9-.]+$") # just basic check
return allowed.match(split[1])
valid = (allowed.match(ms[1]) for ms in mails)
return all(valid)
def isValidID(id):
client = server.handler.db.get_clients(id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment