1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-07-13 01:20:28 +02:00

IMAP folder names may contain characters outside of \w: [a-zA-Z0-9]

This commit is contained in:
Florent Daigniere
2022-12-19 10:33:05 +01:00
parent 79f01c4e33
commit c634b9ac04

View File

@ -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)