RocketChat / RocketChat/Rocket.Chat
Notifications broken for old users not matching current name validation
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
After setting more restrictive name validation by
replacing [0-9a-zA-Z-_.]+ with [0-9a-z-_.]+ (i.e. disallowing uppercase letters)
old users with usernames containing uppercase characters
can no longer be mentioned (and doesn't get notifications)
Steps to reproduce:
- Go to Settings -> General -> UTF8 -> UTF8 Names Validation
- Set it to something without uppercase letters:
[0-9a-z-_.]+ - Try to mention existing user with uppercase character such as
@Alice
Expected behavior:
New user @Bob can't be created because doesn't pass name validation.
Existing user @Alice can log in.
Mentioning @Alice works, @Alice is turned into link, @Alice is notified.
Actual behavior:
New user @Bob can't be created because doesn't pass name validation. (OK)
Existing user @Alice can log in. (OK)
Mentioning @Alice doesn't work, @Alice is not turned into link, @Alice is not notified. (NOT OK)
Server Setup Information:
- Version of Rocket.Chat Server: 1.0.2
Other notes
To be honest I'm not that sure if that's a bug, I just assumed that if existing users whose usernames are no longer valid, given new UTF8 Names Validation rules, can still log in to chat, then all other features should work for them.
Other way would be to temporarily deactivate "invalid" (According to new rules) accounts, until they will be renamed to valid ones. But I guess that would be an overkill.
Possibly related with #10253 and partially with #956 and #7280
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
No files, tests, or entry points are named. Reproduce the issue with UTF8 Names Validation set to [0-9a-z-_.]+, then trace mention linking and notification handling for an existing uppercase username such as @Alice. Done means existing users can log in, be linked when mentioned, and receive notifications while new invalid names remain rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100