Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Implement email address length limitation
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Feb 22, 2017
1 parent 823543f commit 0e71ae6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion www/~/%username/emails/modify.json.spt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ address = request.body['address']

# This checks for exactly one @ and at least one . after @
# The real validation will happen when we send the email
if not email_re.match(address):
too_long = len(address) > 254
if too_long or not email_re.match(address):
raise Response(400, _("Invalid email address."))

if not participant.email_lang:
Expand Down

0 comments on commit 0e71ae6

Please sign in to comment.