Merge pull request #764 from usrpro/fix-alias-bug

Added regex validation for alias username
master
Tim Möhlmann 6 years ago committed by GitHub
commit 19df86f13f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -136,7 +136,7 @@ class TokenForm(flask_wtf.FlaskForm):
class AliasForm(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( wildcard = fields.BooleanField(
_('Use SQL LIKE Syntax (e.g. for catch-all aliases)')) _('Use SQL LIKE Syntax (e.g. for catch-all aliases)'))
destination = DestinationField(_('Destination')) destination = DestinationField(_('Destination'))

Loading…
Cancel
Save