RocketChat / RocketChat/Rocket.Chat

Bug: Case-sensitive email domain validation

Open
#40,045 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
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

  1. Go to Admin Panel → Accounts → Registration

  2. Set Allowed Domains List to:
    gmail.com

  3. Save the setting

  4. Attempt to register with:
    test@GMAIL.com

  5. Observe that registration fails ;

  6. Try again with:
    test@gmail.com

  7. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.