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

[BUG] [ANCHOR: BE PYTHON] Invalid domain part allowed in email during Registration #831

Open
emmanuellaomoregie opened this issue Aug 22, 2024 · 0 comments · Fixed by hngprojects/hng_boilerplate_python_fastapi_web#924
Assignees
Labels
auth Issues categorised by authentication bug Something isn't working

Comments

@emmanuellaomoregie
Copy link

Description

During user registration, the local part of the email is properly validated, as well as the domain part, but any extra character addition to the domain part is allowed(not properly validated) for example [[email protected]] is currently allowed.

Acceptance Criteria

  • Given an email with an incorrectly formatted domain part (e.g., [email protected]), the registration process should reject the email and display an appropriate error message.
  • The updated validation logic should allow emails with correctly formatted domain parts (e.g., [email protected]).
  • The system should prevent registration with any email that does not conform to standard email format rules

Purpose

Ensure that email validation during user registration correctly detects and rejects invalid domain formats.

Requirements

  • Modify the existing email validation logic to detect and reject any email addresses with repeated or extra characters in the domain part.
  • Implement a check to ensure that the domain part of the email ends with a valid domain (e.g., .com, .net, .org) and does not contain any additional or repeated domain suffixes.
  • Update the error messages to provide clear feedback when an invalid domain format is detected during registration.

Expected Outcome

The registration process should reject any email addresses with invalid domain formats

###Screenshots of the error
ENTERED [[email protected] DURING REGISTRATION
IMG_2663

SERVER ALLOWED REGISTRATION
IMG_2664

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Issues categorised by authentication bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants