RocketChat / RocketChat/Rocket.Chat

File Upload Error + Bad Words Filter

Open
#22,918 4 comments 1 reaction 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:

Before upgrading to 3.17.0, the file upload feature was working flawlessly. Users were able to drag and drop pictures and other types of files. As soon as I deployed the 3.17.0 update, our users started complaining about an error they get when they were trying to upload a file.

Steps to reproduce:
  1. Open any message window (Group or private)
  2. Upload any type of document (We use a lot of screenshots for sharing issues)
  3. An error "Cannot read property of "0" null" will occur
Expected behavior:

In the previous version, it was working as expected.

Actual behavior:

In the new version, it would give the user an error for any type of file upload.

Server Setup Information:
  • Version of Rocket.Chat Server: 3.17.0
  • Operating System: Ubuntu 20
  • Deployment Method: Docker Image
  • Number of Running Instances: 1
  • DB Replicaset Oplog: *
  • NodeJS Version: 12.22.1
  • MongoDB Version: 4.0.26
Client Setup Information
  • Desktop App or Browser Version: Desktop App 3.2.3 | Firefox
  • Operating System: Windows 10 | Ubuntu
Additional context

By checking the log, I was able to pinpoint the issue to make it work. It seems that issue is tied to the bad words filtering feature as shown in the log below. In a corporate environment, the bad words filtration is a must.

Relevant logs:

image

This was from my staging 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

Reproduce the failure on Rocket.Chat 3.17.0 using the reported file-upload steps with bad-words filtering enabled. Start by inspecting the server log around the filtering error and the file-upload entry point. Done means uploads succeed for documents and images while the bad-words filter remains enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, mongodb, node.js, typescript
Domain
backend, content
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.