You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1a08a3c
Browse filesBrowse the repository at this point in the historyBrowse files
[fix](auth) journal DISCARD OLD PASSWORD as a no-op carrier for pre-feature FEs
DISCARD OLD PASSWORD used to ride OP_SET_PASSWORD with the account's
unchanged primary so that an FE binary without the feature could still
replay the entry. The primary value did survive that replay, but the
password-policy state did not: a pre-feature set-password replay appends
the primary to the password history again and refreshes the password
creation time.
The entry is now an OP_ALTER_USER log whose carrier op is
SET_PASSWORD_POLICY with every option UNSET, plus a discard marker
(AlterUserOperationLog.discardOldPassword). A pre-feature binary drops
the unknown field and replays a policy update that changes nothing
(every UNSET branch returns early, no password is journaled), while a
binary with the feature reads the marker and drops the secondary
password. A new AlterUserOpType name is still not journaled: a
pre-feature binary deserializes it as null and fails replay.
PrivInfo loses the discardPasswd flag (RETAIN keeps retainPasswd).
Auth's retainCurrentPassword parameter is renamed retainCurrent (the
name UserManager already uses): master's credential-log checkstyle rule
flags any logged identifier ending in Password, and this one is a
boolean, not a credential.
Tests: DualPasswordTest moves to JUnit 5 like the rest of the tree;
testDiscardJournalsAsNoOpPolicyEntry pins the journal shape and its GSON
round trip; testDiscardReplayLeavesPasswordPolicyUntouched replays the
entry both as a pre-feature binary sees it (marker dropped, the same
alterUserInternal path) and as a current one, asserting the history
size and the password creation time are unchanged either way, with the
old OP_SET_PASSWORD carrier as the contrast that does change them.
Signed-off-by: Raghvendra Singh <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
0 commit comments