RocketChat / RocketChat/Rocket.Chat
User can send message to a channel without joining it
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
If we sign in through RC API, we get rc_uid and rc_token, and with the help of them, we can send a message. The thing is, when a user is authenticated, he/she can even message in channels in which they've not even joined.
Steps to reproduce:
- Login a user with the help of this API Endp
- Send a message to a channel in which you aren't even a part of yet using this API endp
- The message will be sent successfully.
Expected behavior:
User must be a part of that channel to send the message.
Actual behavior:
The message is sent successfully.

Server Setup Information:
- Version of Rocket.Chat Server: 4.6.4
- Operating System: Ubuntu 20.04
- Deployment Method: docker
- Number of Running Instances: 1
- DB Replicaset Oplog: Enabled
- NodeJS Version: 14.18.3 - x64
- MongoDB Version:4.4.15
Client Setup Information
- Desktop App or Browser Version: Brave
- Operating System: Ubuntu 20.04
Additional context
Relevant logs:
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
Reproduce the behavior using the authentication API endpoint to obtain credentials, then call the chat send-message API endpoint for a channel the user has not joined. Trace the authorization checks for that request and verify that an unjoined user cannot send a message while permitted channel members still can.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, authorization, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100