RocketChat / RocketChat/Rocket.Chat
Discussion can be created with whitespace-only name
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 👇
Steps to reproduce
- Click + → Create discussion
- Select a Parent channel or team
- In the Name field, enter only spaces (e.g. " ")
- Click Create
Expected behavior
- The discussion should not be created if the Name contains only whitespace.
- 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
- The Name field is required, but whitespace-only input bypasses validation.
- This can lead to:
i) Unidentifiable discussion rooms
ii) Confusing navigation for users and admins
iii) Potential moderation and accessibility issues
Environment
- Rocket.Chat Web
- Tested locally
- Browser: Chrome
- OS: Any
Evidence
https://github.com/user-attachments/assets/c7696aad-7474-44bb-9397-0443496998e4
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 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