RocketChat / RocketChat/Rocket.Chat
Some cookies are misusing the recommended “SameSite“ attribute
Open
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 upgrading to 6.0.0 we're seeing the next trace in our browser console logs when we try to access the page:
Cookie “rc_uid” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite
Cookie “rc_token” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite
Steps to reproduce:
- Upgrade from 5.1.0 to 6.0.0
- Open the rocketchat url in a browser
- See error in the browser console logs
Expected behavior:
No error in the logs
Actual behavior:
Server Setup Information:
- Version of Rocket.Chat Server: 6.0.0
- Operating System: Ubuntu
- Deployment Method: docker
- Number of Running Instances: 1
- DB Replicaset Oplog: Enabled
- NodeJS Version: 14.21.2 - x64
- MongoDB Version: 5.0.15
Client Setup Information
- Desktop App or Browser Version: irrelevant
- Operating System: irrelevant
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 tracing where the rc_uid and rc_token cookies are set during the 5.1.0-to-6.0.0 upgrade; the report names no source files, tests, or entry points. Reproduce the browser console warning and verify that both cookies use a valid SameSite value without introducing authentication regressions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- authentication, backend, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100