Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update email regexes to detect + #9326

Conversation

rebecca-shoptaw
Copy link
Collaborator

Closes #9325.

Fix. Adds + detection to email regex for live & backend validation.

Technical

Simply added a specification that one or more characters that are not a plus sign must appear before the @. Also made the regexes more consistent, preferring the current account.py regex which also confirms the existence of a period after the @.

Testing

  1. Log out (if logged in)
  2. Go to /account/create
  3. Attempt to make an account using an email with a plus sign
  4. A realtime error should appear
  5. Ignore the error and try to submit
  6. An HTML-generated error should appear and prevent submission

Screenshot

(pending testing on GitPod)

Stakeholders

@cdrini

@rebecca-shoptaw
Copy link
Collaborator Author

Turns out we can fix this on the IA side instead! Handing over to them to update the endpoint so it throws an "already registered" error if the + alias matches an existing account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detect + when validating emails for registration
1 participant