RocketChat / RocketChat/Rocket.Chat

Team Channels can be found from non-members

Open
#28,982 3 comments 0 reactions 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:

We are using private Teams in our environment. Inside the teams user are creating public and private channels.
If a public channel is created inside the team, a non-member can find that channel in the search. In the "Directory" the channel is not listed for the non-members.
If that user tries to open that channel it throws at least an error, that the room wasn't found.

Steps to reproduce:
  1. Create a private Team
  2. Create a public channel inside the Team
  3. Login as an user that is not a member of that Team
  4. Open the search (^+K) and search for that channel
Expected behavior:

Even that it is a public channel, it belongs specifically to a (private) team. So the channel should not be found by a non-member. Not in the search nor in the directory.

Actual behavior:

Private Team is called: TeamTest123
Public Channel in that team is called: ChannelTest123
image

The private Team I can't find in the search nor the directory. So that's correct!
image

The public Channel I can't find in the directory but it's found in the search.
image

Server Setup Information:
  • Version of Rocket.Chat Server: 6.1.3
  • Deployment Method: official docker image
  • Number of Running Instances: 1
  • MongoDB Version: 6.0
Client Setup Information

Checked with Chrome and Windows Desktop App

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

Reproduce the case by creating a private Team with a public channel, then use the search entry point (^+K) as a non-member and compare it with Directory. Trace how Team Channels are exposed to search and verify the visibility rules for private Teams. Done means the channel is absent from both search and Directory for non-members while remaining available to permitted users.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authorization, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.