From caa8412d82f661f1047ceb1e3d03c8aa0229d01a Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Sun, 5 Feb 2023 17:01:34 +0100 Subject: [PATCH] close #1236: Allow + in localpart of addresses --- core/admin/mailu/ui/forms.py | 2 +- towncrier/newsfragments/1236.bugfix | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 towncrier/newsfragments/1236.bugfix diff --git a/core/admin/mailu/ui/forms.py b/core/admin/mailu/ui/forms.py index c6335559..79c76450 100644 --- a/core/admin/mailu/ui/forms.py +++ b/core/admin/mailu/ui/forms.py @@ -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) diff --git a/towncrier/newsfragments/1236.bugfix b/towncrier/newsfragments/1236.bugfix new file mode 100644 index 00000000..307082a3 --- /dev/null +++ b/towncrier/newsfragments/1236.bugfix @@ -0,0 +1 @@ +Allow '+' in the localpart of email addresses to forward to