Skip to content

Commit

Permalink
Improve regform email validation RH (#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 7, 2024
1 parent 367d9ab commit ba67f7b
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 @@ -37,7 +37,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 LowercaseString, UUIDString
from indico.util.marshmallow import LowercaseString, UUIDString, not_empty
from indico.web.args import parser, use_kwargs
from indico.web.flask.util import send_file, url_for
from indico.web.util import ExpectedError
Expand Down Expand Up @@ -265,7 +265,7 @@ class RHRegistrationFormCheckEmail(InvitationMixin, RHRegistrationFormBase):
ALLOW_PROTECTED_EVENT = True

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

0 comments on commit ba67f7b

Please sign in to comment.