-
Notifications
You must be signed in to change notification settings - Fork 927
🍒 [PM-27902] Logout user after successful master password reset #6137
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
🍒 [PM-27902] Logout user after successful master password reset #6137
Conversation
|
Claude finished @aj-rosado's task —— View job PR Review: Master Password Reset Security FixThis cherry-pick addresses a critical security vulnerability where users remained logged in after forced password resets. SummaryChanges:
Security Impact: ✅ Critical security issue resolved - users can no longer bypass forced password reset requirements. Code Review✅ Architecture Compliance: Follows MVVM patterns, uses Result types correctly, proper DI usage Findings2 findings identified - see inline comments for details:
Review CompleteThis PR successfully addresses the security vulnerability with a clean, minimal implementation. The cherry-pick is appropriate for the release branch and maintains code quality standards. |
| userLogoutManager.logout( | ||
| userId = ACCOUNT_1.profile.userId, | ||
| reason = LogoutReason.PasswordReset, | ||
| ) |
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.
Consider using a matcher to explicitly verify the reason type and properties:
| ) | |
| verify { | |
| userLogoutManager.logout( | |
| userId = ACCOUNT_1.profile.userId, | |
| reason = match { it is LogoutReason.PasswordReset && it.source == null }, | |
| ) | |
| } |
This ensures the correct LogoutReason subtype is used and validates its properties.
|
|
||
| // Log out the user after successful password reset. | ||
| // This clears all user state including forcePasswordResetReason. | ||
| logout(reason = LogoutReason.PasswordReset) |
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.
💭 Finding 2: Order of operations - storing password hash before logout.
The current implementation stores the new password hash (lines 1027-1039) before logging out. If logout were interrupted or failed, the user would have the new hash stored but remain logged in.
Is this ordering intentional to guarantee the new password is always persisted? Or should logout happen first to ensure clean state before any storage operations?
|
New Issues (61)Checkmarx found the following issues in this Pull Request
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/2025.10-rc38 #6137 +/- ##
=======================================================
Coverage ? 84.82%
=======================================================
Files ? 721
Lines ? 52825
Branches ? 7667
=======================================================
Hits ? 44809
Misses ? 5328
Partials ? 2688 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
thanks @SaintPatrck and @david-livefront |


🎟️ Tracking
PM-27902
Cherry-picked from #6133
📔 Objective
Fixes a critical security issue where users remained logged in after updating their master password due to policy requirements. This allowed users to immediately access their vault with the new password without re-authentication, bypassing the security intent of forced password resets.
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:) or similar for great changes:memo:) or ℹ️ (:information_source:) for notes or general info:question:) for questions:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:) for suggestions / improvements:x:) or:warning:) for more significant problems or concerns needing attention:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt:pick:) for minor or nitpick changes