RocketChat / RocketChat/Rocket.Chat
Channel names allow case-variant duplicates (e.g., general and General) causing routing conflicts
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description
Room name validation currently performs a case-sensitive duplicate check in getValidRoomName.
However, routing, mentions, and search treat room names case-insensitively.
Because of this mismatch, channels that differ only by letter casing can be created.
Example:
general
General
Both rooms coexist in the database, but the application resolves them to the same route.
Opening:
/channel/General
redirects to:
/channel/general
This leads to incorrect navigation and mention behavior.
Steps to Reproduce
- Create a channel named
general - Create another channel named
General - Both channels are created successfully
- Visit
/channel/General
Expected behavior
The second channel creation should be rejected because channel names should be unique regardless of letter casing.
Actual behavior
Both channels are created, but routing redirects to the lowercase version, causing inconsistent behavior with navigation, mentions, and search.
Impact
- Incorrect channel routing
- Confusing mentions
- Broken navigation for users
- Duplicate logical channels
Proposed Solution
Normalize the room name (e.g., lowercase) before duplicate validation to enforce case-insensitive uniqueness.
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 locating getValidRoomName and inspect how it checks for duplicate channel names. Add coverage for creating both general and General, then verify that the second creation is rejected and that existing case-insensitive routing remains consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100