mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-12 11:39:59 +05:00
fix(sso): fix sso password change issues
This commit is contained in:
parent
a27ff8e62f
commit
9778b13cd1
@ -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);
|
||||
|
||||
};
|
||||
|
||||
@ -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) {
|
||||
|
||||
2
www/common/worker.bundle.min.js
vendored
2
www/common/worker.bundle.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user