fix(sso): fix sso password change issues

This commit is contained in:
yflory 2026-05-12 11:45:29 +02:00
parent a27ff8e62f
commit 9778b13cd1
3 changed files with 6 additions and 3 deletions

View File

@ -209,12 +209,13 @@ const factory = (Util, ApiConfig = {}, ServerCommand, Nacl) => {
};
Block.updateSSOBlock = function (data, cb) {
const { blockKeys, oldBlockKeys } = data;
const { blockKeys, oldBlockKeys, hasPassword } = data;
var oldProof = oldBlockKeys && Block.proveAncestor(oldBlockKeys);
ServerCommand(blockKeys.sign, {
command: 'SSO_UPDATE_BLOCK',
ancestorProof: oldProof
ancestorProof: oldProof,
hasPassword
}, cb);
};

View File

@ -2010,6 +2010,7 @@ define([
var oldBlockKeys = oldAllocated.blockKeys;
var blockKeys = newAllocated.blockKeys;
var auth = data.auth;
var hasPassword = Boolean(data.newPassword);
nThen(function (waitFor) {
// Check if our drive is already owned
@ -2135,6 +2136,7 @@ define([
// Update "sso_block" data for SSO accounts
Block.updateSSOBlock({
blockKeys: blockKeys,
hasPassword: hasPassword,
oldBlockKeys: oldBlockKeys
}, waitFor(function (err) {
if (err) {

File diff suppressed because one or more lines are too long