RocketChat / RocketChat/Rocket.Chat

Users can clone the same channel by just changing the letter case

Open
#17,758 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

triaged
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

Any user can clone any channel as long as they change the letter case.
As example, if I create a channel named #Portugal, another user can create #portugal, another one can create #PoRtUgAl

Steps to reproduce:
  1. Create a channel named #SpaceShip
  2. Create the same channel but this time names #spaceship
  3. Both channels will coexist, which doesn't make much sense since the name is the same except the letter casing.
Expected behavior:

As long as the channel name is the same, the letter casing should be ignored and the cloned channel shouldn't be created.

Actual behavior:

ANY channel can be cloned more than once as long as the letter casing differs.

Server Setup Information:
  • Version of Rocket.Chat Server: 3.2.2
  • Operating System: Ubuntu 19.10
  • Deployment Method: tar
  • Number of Running Instances: 1
  • DB Replicaset Oplog: enabled (rs01)
  • NodeJS Version: 12.16.1
  • MongoDB Version: 4.0.18
Client Setup Information
  • Desktop App or Browser Version: Mobile: 4.7.0.17188 | Desktop: Firefox 7.60
  • Operating System: Mobile: Android 9 | Desktop: Ubuntu 20.04
Additional context
Relevant logs:

No relevant logs to show (I believe)

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 reproducing the issue through the channel-creation flow: create #SpaceShip, then try #spaceship and #SpAcEsHiP. Check how channel names are validated and persisted with the stated MongoDB setup; done means differently cased versions of the same name cannot coexist.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb, typescript
Domain
backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.