1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-06-02 23:17:26 +02:00

close #1236: Allow + in localpart of addresses

This commit is contained in:
Florent Daigniere 2023-02-05 17:01:34 +01:00
parent 44ad14811d
commit caa8412d82
2 changed files with 2 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class MultipleEmailAddressesVerify(object):
self.message = message
def __call__(self, form, field):
pattern = re.compile(r'^([_a-z0-9\-]+)(\.[_a-z0-9\-]+)*@([a-z0-9\-]{1,}\.)*([a-z]{1,})(,([_a-z0-9\-]+)(\.[_a-z0-9\-]+)*@([a-z0-9\-]{1,}\.)*([a-z]{2,}))*$')
pattern = re.compile(r'^([_a-z0-9\-\+]+)(\.[_a-z0-9\-\+]+)*@([a-z0-9\-]{1,}\.)*([a-z]{1,})(,([_a-z0-9\-\+]+)(\.[_a-z0-9\-\+]+)*@([a-z0-9\-]{1,}\.)*([a-z]{2,}))*$')
if not pattern.match(field.data.replace(" ", "")):
raise validators.ValidationError(self.message)

View File

@ -0,0 +1 @@
Allow '+' in the localpart of email addresses to forward to