mirror of
https://github.com/bitwarden/browser
synced 2025-12-21 02:33:46 +00:00
avoid using the SDK to decrypt attachments for emergency access (#16293)
- The SDK does not have emergency access functionality built in at this point.
This commit is contained in:
@@ -1544,11 +1544,13 @@ export class CipherService implements CipherServiceAbstraction {
|
||||
return encryptedCiphers;
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
async getDecryptedAttachmentBuffer(
|
||||
cipherId: CipherId,
|
||||
attachment: AttachmentView,
|
||||
response: Response,
|
||||
userId: UserId,
|
||||
useLegacyDecryption?: boolean,
|
||||
): Promise<Uint8Array> {
|
||||
const useSdkDecryption = await this.configService.getFeatureFlag(
|
||||
FeatureFlag.PM19941MigrateCipherDomainToSdk,
|
||||
@@ -1558,7 +1560,7 @@ export class CipherService implements CipherServiceAbstraction {
|
||||
this.ciphers$(userId).pipe(map((ciphersData) => new Cipher(ciphersData[cipherId]))),
|
||||
);
|
||||
|
||||
if (useSdkDecryption) {
|
||||
if (useSdkDecryption && !useLegacyDecryption) {
|
||||
const encryptedContent = await response.arrayBuffer();
|
||||
return this.cipherEncryptionService.decryptAttachmentContent(
|
||||
cipherDomain,
|
||||
|
||||
Reference in New Issue
Block a user