Fix change password to a previously used value

pull/1/head
yflory 4 years ago
parent fdfd7db362
commit 9c8924ee27

@ -1192,7 +1192,6 @@ define([
} else if (mailbox && typeof(mailbox) === "object") { } else if (mailbox && typeof(mailbox) === "object") {
m = {}; m = {};
Object.keys(mailbox).forEach(function (ed) { Object.keys(mailbox).forEach(function (ed) {
console.log(mailbox[ed]);
try { try {
m[ed] = newCrypto.encrypt(oldCrypto.decrypt(mailbox[ed], true, true)); m[ed] = newCrypto.encrypt(oldCrypto.decrypt(mailbox[ed], true, true));
} catch (e) { } catch (e) {
@ -1227,6 +1226,7 @@ define([
cryptgetVal = JSON.stringify(parsed); cryptgetVal = JSON.stringify(parsed);
} }
}), optsGet); }), optsGet);
Cache.clearChannel(newSecret.channel, waitFor());
}).nThen(function (waitFor) { }).nThen(function (waitFor) {
optsPut.metadata.restricted = oldMetadata.restricted; optsPut.metadata.restricted = oldMetadata.restricted;
optsPut.metadata.allowed = oldMetadata.allowed; optsPut.metadata.allowed = oldMetadata.allowed;
@ -1608,6 +1608,7 @@ define([
} }
})); }));
})); }));
Cache.clearChannel(newSecret.channel, waitFor());
}).nThen(function (waitFor) { }).nThen(function (waitFor) {
// The new rt channel is ready // The new rt channel is ready
// The blob uses its own encryption and doesn't need to be reencrypted // The blob uses its own encryption and doesn't need to be reencrypted

@ -452,7 +452,7 @@ define([
account.note = obj.note; account.note = obj.note;
cb(obj); cb(obj);
}); });
}); }, Cache);
}; };
////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////

Loading…
Cancel
Save