RocketChat / RocketChat/Rocket.Chat

No sanity check when getting usernames from oauth

Open
#13,792 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feat: oauth / sso type: bug
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

I allow oauth login via discord like described in #11396 and fetch the username like described in #11112.
Problem is that discord allows spaces in usernames that rocketchat doesn't. Users that login with discord and have spaces in their names encounter weird issues, like they can not be pinged and they can not change their pfp.

Maybe rocketchat should sanity check and fix it. Automatically replacing spaces in usernames with dots would already be enough.

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 reading the OAuth login and username-fetching flows described in issues #11396 and #11112, then trace where the Discord username enters Rocket.Chat. Ensure usernames containing spaces are normalized before use; done means affected users can be pinged and can change their profile picture.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.