-
Notifications
You must be signed in to change notification settings - Fork 13k
fix: ddp streamer not waiting some requests completion #38118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: e728998 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
WalkthroughThis pull request introduces release metadata for a patch version of the account service and fixes password validation in the login flow by adding an Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 2 files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.changeset/stale-shoes-serve.md (1)
1-5: Consider a more specific changeset description.The changeset describes "DDP streamer requests were returning before processing was completed," but the actual fix addresses a critical authentication bug where password validation wasn't being awaited in the login flow. While the generic description may be intentional for security reasons, a more accurate description would help with changelog clarity.
📝 Suggested alternative description
--- '@rocket.chat/account-service': patch --- -Fixes an issue where some DDP streamer requests were returning before processing was completed +Fixes authentication flow to properly await password validation before proceeding with login
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
.changeset/stale-shoes-serve.mdee/apps/account-service/src/lib/loginViaUsername.ts
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation
Files:
ee/apps/account-service/src/lib/loginViaUsername.ts
⏰ 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). (3)
- GitHub Check: 📦 Build Packages
- GitHub Check: CodeQL-Build
- GitHub Check: CodeQL-Build
🔇 Additional comments (1)
ee/apps/account-service/src/lib/loginViaUsername.ts (1)
18-18: Critical security fix: Authentication now properly awaits password validation.Without
await, thevalidvariable would be assigned a Promise object (truthy) instead of the actual validation result, causing authentication to always succeed whenever the bcrypt hash exists, regardless of the password provided. This fix ensures password validation completes before proceeding.Verification confirms
validatePasswordreturnsPromise<boolean>viabcrypt.compare, and no other calls to this function in the codebase are missing theawaitpattern.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-8.0.0 #38118 +/- ##
=================================================
+ Coverage 70.65% 70.67% +0.02%
=================================================
Files 3145 3145
Lines 108708 108708
Branches 19549 19497 -52
=================================================
+ Hits 76806 76828 +22
+ Misses 29897 29886 -11
+ Partials 2005 1994 -11
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
/patch |
|
Pull request #38120 added to Project: "Patch 7.13.3" |
|
/backport 7.12.4 |
|
/backport 7.11.4 |
|
Pull request #38121 added to Project: "Patch 7.12.4" |
|
Pull request #38122 added to Project: "Patch 7.11.4" |
|
/backport 7.10.7 |
|
/backport 7.9.8 |
|
Pull request #38123 added to Project: "Patch 7.10.7" |
|
/backport 7.8.6 |
|
Pull request #38124 added to Project: "Patch 7.9.8" |
|
Pull request #38125 added to Project: "Patch 7.8.6" |
Proposed changes (including videos or screenshots)
Issue(s)
Steps to test or reproduce
Further comments
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.