Skip to content

Commit

Permalink
BACKPORT Improve regform email validation RH (indico#6275)
Browse files Browse the repository at this point in the history
Fail nicely in case of empty email address
  • Loading branch information
tomako committed Apr 8, 2024
1 parent f66c977 commit 3c566de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions indico/modules/events/registration/controllers/display.py
Expand Up @@ -32,7 +32,7 @@
from indico.modules.users.util import send_avatar, send_default_avatar
from indico.util.fs import secure_filename
from indico.util.i18n import _
from indico.util.marshmallow import UUIDString
from indico.util.marshmallow import UUIDString, not_empty
from indico.web.args import use_kwargs
from indico.web.flask.util import send_file, url_for

Expand Down Expand Up @@ -258,7 +258,7 @@ class RHRegistrationFormCheckEmail(RHRegistrationFormBase):
ALLOW_PROTECTED_EVENT = True

@use_kwargs({
'email': fields.String(required=True),
'email': fields.String(required=True, validate=not_empty),
'update': UUIDString(load_default=None),
'management': fields.Bool(load_default=False),
}, location='query')
Expand Down

0 comments on commit 3c566de

Please sign in to comment.