mirror of
https://github.com/bitwarden/clients.git
synced 2026-07-07 21:10:55 +08:00
[PM-33952] Fix cipher key encryption logic when editing ciphers (#19695)
This commit is contained in:
parent
6980030a36
commit
ab088536bb
@ -321,8 +321,8 @@ export class CipherService implements CipherServiceAbstraction {
|
||||
|
||||
if (
|
||||
// prevent unprivileged users from migrating to cipher key encryption
|
||||
(model.viewPassword || originalCipher?.key) &&
|
||||
(await this.getCipherKeyEncryptionEnabled())
|
||||
(model.viewPassword && (await this.getCipherKeyEncryptionEnabled())) ||
|
||||
originalCipher?.key
|
||||
) {
|
||||
cipher.key = originalCipher?.key ?? null;
|
||||
const userOrOrgKey = await this.getKeyForCipherKeyDecryption(cipher, userId);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user