-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request
Description
Description
While reviewing input validation logic, I noticed the current regex used for email validation is overly permissive and can lead to accepting invalid email formats.
Current regex:
^[a-zA-Z._%+-]+@[a-zA-Z.-]+\.[a-zA-Z]{2,}$
Identified Issues
This regex:
- Matches many common emails, but...
- Also matches invalid formats, such as:
john..doe@example.com (consecutive dots)
.john@example.com (starts with dot)
john.@example.com (ends with dot)
john@-example.com (hyphen at start of domain)
john@example-.com (hyphen at end of domain)
These can cause downstream issues in email-related systems or user account processing.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request