fix: add permission check to the autotransate.translateMessage endpoint#40508
Conversation
|
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: b18adfd The changes in this PR will be included in the next version bump. This PR includes changesets to release 42 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,js}📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Files:
🧠 Learnings (6)📚 Learning: 2026-03-16T21:50:37.589ZApplied to files:
📚 Learning: 2026-02-23T17:53:06.802ZApplied to files:
📚 Learning: 2026-02-24T19:09:01.522ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-05-06T12:21:44.083ZApplied to files:
🔇 Additional comments (3)
WalkthroughThis PR adds room access validation to the ChangesAutotranslate room access authorization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #40508 +/- ##
===========================================
+ Coverage 69.60% 69.63% +0.03%
===========================================
Files 3323 3323
Lines 122610 122610
Branches 21872 21872
===========================================
+ Hits 85347 85384 +37
+ Misses 33933 33889 -44
- Partials 3330 3337 +7
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
/backport 8.4.2 |
|
Pull request #40547 added to Project: "Patch 8.4.2" |
|
/backport 8.3.4 |
|
Pull request #40548 added to Project: "Patch 8.3.4" |
|
/backport 8.2.4 |
|
Sorry, I couldn't do that backport because of conflicts. Could you please solve them? you can do so by running the following commands: after that just run |
|
/backport 8.2.4 |
|
Pull request #40549 added to Project: "Patch 8.2.4" |
|
/backport 8.1.5 |
|
Sorry, I couldn't do that backport because of conflicts. Could you please solve them? you can do so by running the following commands: after that just run |
|
/backport 8.1.5 |
|
Pull request #40550 added to Project: "Patch 8.1.5" |
|
/backport 8.0.6 |
|
Sorry, I couldn't do that backport because of conflicts. Could you please solve them? you can do so by running the following commands: after that just run |
|
/backport 8.0.6 |
|
Pull request #40551 added to Project: "Patch 8.0.6" |
|
/backport 7.13.8 |
|
Sorry, I couldn't do that backport because of conflicts. Could you please solve them? you can do so by running the following commands: after that just run |
|
/backport 7.13.8 |
|
Pull request #40552 added to Project: "Patch 7.13.8" |
|
/backport 7.10.12 |
|
Sorry, I couldn't do that backport because of conflicts. Could you please solve them? you can do so by running the following commands: after that just run |
|
/backport 7.10.12 |
|
Pull request #40553 added to Project: "Patch 7.10.12" |
Proposed changes (including videos or screenshots)
The
autotranslate.translateMessageendpoint doesn't check if the user can access the room before proceeding with the translation. This could lead to attackers exploiting this endpoint to retrieve data they don't have access to. The issue, however, is medium to low severity since there's no trivial way of getting message IDs for private rooms and translation would have to be enabled and configured in the workspace.This PR adds a
canAccessRoomAsynccheck to the endpoint and an E2E test to ensure that it will return403 Forbiddenif the user is not part of the room.Issue(s)
https://rocketchat.atlassian.net/browse/VLN-372
Steps to test or reproduce
Further comments
Summary by CodeRabbit