RocketChat / RocketChat/Rocket.Chat

Sending/receiving pictures/data for exact two users not working, works for other users fine

Open
#22,650 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description:

Two users out of 20 can not see images / data send from them to others or received from others.
For all other users, it works fine.

Steps to reproduce:

Send image or datafile from clipboard to chat. But it seems, that this is not reproducable in a standard installation. May there is something broken in our database.

Expected behavior:

Show the real screenshot, not a "retry" picture.
Or show the real datafile, which can be downloaded.

Actual behavior:

Send a screenshot from clipboard always shows this in the chat.
image

When trying to download this screenshot-file by the download button, the following message appears:
Der Zugriff auf chat.xxxxxxxxxxxxxxxxxxxx.de wurde verweigert Sie sind nicht zum Aufrufen dieser Seite autorisiert.
HTTP ERROR 403

This happens only for the two users, but in all chats (can not open send and received pictures / files)
All other users see the pictures / files.

Server Setup Information:
  • Version of Rocket.Chat Server: 3.16.2
  • Apps Engine Version: 1.27.1
  • Operating System: Debian GNU/Linux 10 (buster) Linux 4.19.0-17-amd64 #1 SMP Debian 4.19.194-2 (2021-06-21) x86_64 GNU/Linux
  • Deployment Method: tar
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: v12.18.4
  • MongoDB Version: 4.2.14 / wiredTiger (oplog Enabled)
Client Setup Information
  • Desktop App or Browser Version: Browser Version: Chromium Version 91.0.4472.114 (Offizieller Build) Arch Linux (64-Bit)
  • Operating System: Manjaro Linux
Additional context

We are using LDAP, but this seems to work, because the 2 users can log into their account and work with the chat.
File upload from all users (also this 2) is working, because others can download their send files.
But this 2 users can not open their own send files/pictures and received files/pictures from others.
Seems to be a problem with access to the database.

the two users are "verified" users.

This option is set per default to True
Protect Uploaded Files = True (Only authenticated users will have access)

When setting this option to False, data handling works for all users

Any hints there what to check next?

Relevant logs:

No relevant logs found on server.

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 with the Protect Uploaded Files setting and reproduce the 403 for the two affected verified users, comparing their access with users who can open the same files. Trace the upload download path and authentication behavior; done means affected users can view and download sent and received images and data files while protection remains enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb, typescript
Domain
authentication, backend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.