From c634b9ac046ee80ca697098b7a0d723f73660e16 Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Mon, 19 Dec 2022 10:33:05 +0100 Subject: [PATCH] IMAP folder names may contain characters outside of \w: [a-zA-Z0-9] --- core/admin/mailu/ui/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/admin/mailu/ui/forms.py b/core/admin/mailu/ui/forms.py index 959f46b2..c6335559 100644 --- a/core/admin/mailu/ui/forms.py +++ b/core/admin/mailu/ui/forms.py @@ -47,7 +47,7 @@ class MultipleFoldersVerify(object): self.message = message def __call__(self, form, field): - pattern = re.compile(r'^\w+(\s*,\s*\w+)*$') + pattern = re.compile(r'^[^,]+(,[^,]+)*$') if not pattern.match(field.data.replace(" ", "")): raise validators.ValidationError(self.message)