RocketChat / RocketChat/Rocket.Chat
Bad words filtering does not work as expected
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
I enable Allow Message bad words filtering feature and it does not work as expected
Seem 2nd keywords or utf-8 keywords were not filtered.
Steps to reproduce:
- Go to settings, enable
Allow Message bad words filtering. - Add some keywords as string:
cho, meoorchó, mèo. - Click
Save changes

- Go to channel and enter enter one of
cho,meo,chó,mèo
Expected behavior:
Should be show as ***
Actual behavior:
just cho is show as ***,
chó still show chó
meo or mèo (not 1st keyword) still show as original (because of space before keywords).
Server Setup Information:
- Version of Rocket.Chat Server: 1.0.0-develop
- Operating System: CentOS 7
- Deployment Method: manual
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version: 8.x
- MongoDB Version: 3.6.12
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
Start by reproducing the bad-word filtering cases described in the issue: multiple space-separated keywords and keywords containing UTF-8 characters. Trace the implementation used after enabling the Allow Message bad words filtering setting, then verify that every configured keyword is masked in channel messages and that the existing behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100