From 8fc2846924f8148092926a45cf225485970b5ef9 Mon Sep 17 00:00:00 2001 From: Ionut Filip Date: Tue, 18 Dec 2018 17:06:39 +0200 Subject: [PATCH] Added regex validation for alias username --- 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 57c106c3..40a56a82 100644 --- a/core/admin/mailu/ui/forms.py +++ b/core/admin/mailu/ui/forms.py @@ -136,7 +136,7 @@ class TokenForm(flask_wtf.FlaskForm): class AliasForm(flask_wtf.FlaskForm): - localpart = fields.StringField(_('Alias'), [validators.DataRequired()]) + localpart = fields.StringField(_('Alias'), [validators.DataRequired(), validators.Regexp(LOCALPART_REGEX)]) wildcard = fields.BooleanField( _('Use SQL LIKE Syntax (e.g. for catch-all aliases)')) destination = DestinationField(_('Destination'))