fix(auth): require complete password change key data

This commit is contained in:
shuaiplus
2026-07-13 17:02:59 +08:00
parent 63b642b251
commit 19de8d6e57
2 changed files with 78 additions and 25 deletions
-4
View File
@@ -631,8 +631,6 @@ export async function changeMasterPassword(
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
masterPasswordHash: current.hash,
newMasterPasswordHash,
key: newKey,
authenticationData: {
kdf: {
kdfType: 0,
@@ -653,8 +651,6 @@ export async function changeMasterPassword(
masterKeyWrappedUserKey: newKey,
salt: args.email.trim().toLowerCase(),
},
kdf: 0,
kdfIterations: current.kdfIterations,
}),
});
if (!resp.ok) throw new Error('Change master password failed');