mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 23:33:31 +00:00
Prevented double decryption (#17768)
This commit is contained in:
@@ -496,9 +496,11 @@ describe("DefaultCipherEncryptionService", () => {
|
||||
.mockReturnValueOnce(expectedViews[0])
|
||||
.mockReturnValueOnce(expectedViews[1]);
|
||||
|
||||
const result = await cipherEncryptionService.decryptManyLegacy(ciphers, userId);
|
||||
const [successfulDecryptions, failedDecryptions] =
|
||||
await cipherEncryptionService.decryptManyLegacy(ciphers, userId);
|
||||
|
||||
expect(result).toEqual(expectedViews);
|
||||
expect(successfulDecryptions).toEqual(expectedViews);
|
||||
expect(failedDecryptions).toEqual([]);
|
||||
expect(mockSdkClient.vault().ciphers().decrypt).toHaveBeenCalledTimes(2);
|
||||
expect(CipherView.fromSdkCipherView).toHaveBeenCalledTimes(2);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user