mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-24 12:06:15 +01:00
[PM-4660] return early from cipher decryption if no encryption key (#6774)
* return early from cipher decryption if no key * add comment
This commit is contained in:
parent
0a7fcddd5a
commit
c8bc7c62e9
@ -293,6 +293,10 @@ export class CipherService implements CipherServiceAbstraction {
|
||||
const ciphers = await this.getAll();
|
||||
const orgKeys = await this.cryptoService.getOrgKeys();
|
||||
const userKey = await this.cryptoService.getUserKeyWithLegacySupport();
|
||||
if (orgKeys == null && userKey == null) {
|
||||
// return early if there are no keys to decrypt with
|
||||
return;
|
||||
}
|
||||
|
||||
// Group ciphers by orgId or under 'null' for the user's ciphers
|
||||
const grouped = ciphers.reduce((agg, c) => {
|
||||
|
Loading…
Reference in New Issue
Block a user