RocketChat / RocketChat/Rocket.Chat
Bug: Case-sensitive email domain validation
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description
Email domain validation currently treats domains as case-sensitive.
This causes valid email addresses to be rejected when the domain casing differs from the configured allowed or blocked domain lists.
For example, test@GMAIL.com is rejected when gmail.com is present in the allowed domains list.
Since domain names are case-insensitive by standard, this behavior leads to incorrect validation.
Steps to Reproduce
-
Go to Admin Panel → Accounts → Registration
-
Set
Allowed Domains Listto:
gmail.com -
Save the setting
-
Attempt to register with:
test@GMAIL.com -
Observe that registration fails ;
-
Try again with:
test@gmail.com -
Observe that this succeeds
Expected Behaviour
Email domain validation should be case-insensitive, allowing domains like GMAIL.com when gmail.com is configured.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the email domain validation used by Admin Panel → Accounts → Registration, then inspect how configured allowed and blocked domain lists are compared with submitted addresses. Reproduce the GMAIL.com versus gmail.com cases and add coverage showing that domain casing does not change the validation result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100