Repository navigation
fix: Login with master key overwrites stored MFA settings of user - #10771
Conversation
|
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. Tip
Note Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect. Caution Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## alpha #10771 +/- ##
=======================================
Coverage 93.98% 93.98%
=======================================
Files 193 193
Lines 17101 17101
Branches 259 259
=======================================
+ Hits 16072 16073 +1
+ Misses 1007 1006 -1
Partials 22 22 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
f128e3e to
971d129
Compare
## [9.10.5-alpha.1](9.10.4...9.10.5-alpha.1) (2026-10-09) ### Bug Fixes * Login with master key overwrites stored MFA settings of user ([#10771](#10771)) ([28bb53b](28bb53b))
|
🎉 This change has been released in version 9.10.5-alpha.1 |
Pull Request
Issue
A login with the master key validates the submitted
authDataas an update of the user's auth data instead of as a login. The MFA adapter skips the validation of an update made with the master key, so a master-key login withauthData.mfareplaces the user's stored MFA settings (TOTP secret and recovery codes, or SMS mobile number) with the submitted value, which disables MFA for the user.Approach
isLoginoption that defaults to login. A login validates the auth data withvalidateLoginregardless of whether the request uses the master key or a session token; only an update of the user's auth data usesvalidateUpdate.Changed behavior:
authDataof a provider configured for the user requires valid auth data; for MFA the token is validated and a used recovery code is consumed.logInmutation or a batch request, validatesauthDataas a login.validateLogininstead ofvalidateUpdatefor these logins.Tasks
Summary by CodeRabbit