RocketChat / RocketChat/Rocket.Chat

Discussion can be created with whitespace-only name

Open
#38,434 4 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

When creating a discussion, the Name field accepts whitespace-only input (spaces/tabs).
Submitting the form with such input successfully creates a discussion with an effectively empty name.
This results in unnamed discussions appearing in the sidebar, which can be confusing and hard to manage.
see 👇

Image
Steps to reproduce
  1. Click + → Create discussion
  2. Select a Parent channel or team
  3. In the Name field, enter only spaces (e.g. " ")
  4. Click Create
Expected behavior
  1. The discussion should not be created if the Name contains only whitespace.
  2. The Name field should be validated after trimming whitespace and show an error (similar to an empty value).
Actual behavior

1.The discussion is created successfully.
2. The discussion appears in the sidebar without a visible name.

Why this matters
  1. The Name field is required, but whitespace-only input bypasses validation.
  2. This can lead to:
    i) Unidentifiable discussion rooms
    ii) Confusing navigation for users and admins
    iii) Potential moderation and accessibility issues
Environment
  1. Rocket.Chat Web
  2. Tested locally
  3. Browser: Chrome
  4. OS: Any
Evidence

https://github.com/user-attachments/assets/c7696aad-7474-44bb-9397-0443496998e4

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 by reproducing the issue in Rocket.Chat Web through the Create discussion form, using spaces or tabs in the Name field. Trace the existing required-name validation and make sure whitespace-only input shows an error and does not create a discussion; confirm the behavior against the listed reproduction steps.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.