diff --git a/apps/browser/src/autofill/services/collect-autofill-content.service.ts b/apps/browser/src/autofill/services/collect-autofill-content.service.ts
index 1d464e1313f..e275a2d3ee8 100644
--- a/apps/browser/src/autofill/services/collect-autofill-content.service.ts
+++ b/apps/browser/src/autofill/services/collect-autofill-content.service.ts
@@ -54,6 +54,7 @@ export class CollectAutofillContentService implements CollectAutofillContentServ
private ownedExperienceTagNames: string[] = [];
private readonly updateAfterMutationTimeout = 1000;
private readonly formFieldQueryString;
+ private readonly debouncedProcessMutations = debounce(() => this.processMutations(), 100);
private readonly nonInputFormFieldTags = new Set(["textarea", "select"]);
private readonly ignoredInputTypes = new Set([
"hidden",
@@ -986,7 +987,7 @@ export class CollectAutofillContentService implements CollectAutofillContentServ
}
if (!this.mutationsQueue.length) {
- requestIdleCallbackPolyfill(debounce(this.processMutations, 100), { timeout: 500 });
+ requestIdleCallbackPolyfill(this.debouncedProcessMutations, { timeout: 500 });
}
this.mutationsQueue.push(mutations);
};
diff --git a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/shared/app-table-row-scrollable-m11.component.html b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/shared/app-table-row-scrollable-m11.component.html
index 67cee2a4639..c23202b6832 100644
--- a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/shared/app-table-row-scrollable-m11.component.html
+++ b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/shared/app-table-row-scrollable-m11.component.html
@@ -64,7 +64,9 @@
{{ row.applicationName }}
@if (row.isMarkedAsCritical) {
- {{ "criticalBadge" | i18n }}
+ {{
+ "criticalBadge" | i18n
+ }}
}
diff --git a/libs/common/src/vault/services/default-cipher-encryption.service.spec.ts b/libs/common/src/vault/services/default-cipher-encryption.service.spec.ts
index 98b554b5762..a0ca4833b92 100644
--- a/libs/common/src/vault/services/default-cipher-encryption.service.spec.ts
+++ b/libs/common/src/vault/services/default-cipher-encryption.service.spec.ts
@@ -95,7 +95,6 @@ describe("DefaultCipherEncryptionService", () => {
vault: jest.fn().mockReturnValue({
ciphers: jest.fn().mockReturnValue({
encrypt: jest.fn(),
- encrypt_list: jest.fn(),
encrypt_cipher_for_rotation: jest.fn(),
set_fido2_credentials: jest.fn(),
decrypt: jest.fn(),
@@ -281,23 +280,10 @@ describe("DefaultCipherEncryptionService", () => {
name: "encrypted-name-3",
} as unknown as Cipher;
- mockSdkClient
- .vault()
- .ciphers()
- .encrypt_list.mockReturnValue([
- {
- cipher: sdkCipher,
- encryptedFor: userId,
- },
- {
- cipher: sdkCipher,
- encryptedFor: userId,
- },
- {
- cipher: sdkCipher,
- encryptedFor: userId,
- },
- ]);
+ mockSdkClient.vault().ciphers().encrypt.mockReturnValue({
+ cipher: sdkCipher,
+ encryptedFor: userId,
+ });
jest
.spyOn(Cipher, "fromSdkCipher")
@@ -313,8 +299,7 @@ describe("DefaultCipherEncryptionService", () => {
expect(results[1].cipher).toEqual(expectedCipher2);
expect(results[2].cipher).toEqual(expectedCipher3);
- expect(mockSdkClient.vault().ciphers().encrypt_list).toHaveBeenCalledTimes(1);
- expect(mockSdkClient.vault().ciphers().encrypt).not.toHaveBeenCalled();
+ expect(mockSdkClient.vault().ciphers().encrypt).toHaveBeenCalledTimes(3);
expect(results[0].encryptedFor).toBe(userId);
expect(results[1].encryptedFor).toBe(userId);
@@ -326,7 +311,7 @@ describe("DefaultCipherEncryptionService", () => {
expect(results).toBeDefined();
expect(results.length).toBe(0);
- expect(mockSdkClient.vault().ciphers().encrypt_list).not.toHaveBeenCalled();
+ expect(mockSdkClient.vault().ciphers().encrypt).not.toHaveBeenCalled();
});
});
diff --git a/libs/common/src/vault/services/default-cipher-encryption.service.ts b/libs/common/src/vault/services/default-cipher-encryption.service.ts
index 45542091618..588265846e0 100644
--- a/libs/common/src/vault/services/default-cipher-encryption.service.ts
+++ b/libs/common/src/vault/services/default-cipher-encryption.service.ts
@@ -65,14 +65,21 @@ export class DefaultCipherEncryptionService implements CipherEncryptionService {
using ref = sdk.take();
- return ref.value
- .vault()
- .ciphers()
- .encrypt_list(models.map((model) => this.toSdkCipherView(model, ref.value)))
- .map((encryptionContext) => ({
+ const results: EncryptionContext[] = [];
+
+ // TODO: https://bitwarden.atlassian.net/browse/PM-30580
+ // Replace this loop with a native SDK encryptMany method for better performance.
+ for (const model of models) {
+ const sdkCipherView = this.toSdkCipherView(model, ref.value);
+ const encryptionContext = ref.value.vault().ciphers().encrypt(sdkCipherView);
+
+ results.push({
cipher: Cipher.fromSdkCipher(encryptionContext.cipher)!,
encryptedFor: uuidAsString(encryptionContext.encryptedFor) as UserId,
- }));
+ });
+ }
+
+ return results;
}),
catchError((error: unknown) => {
this.logService.error(`Failed to encrypt ciphers in batch: ${error}`);
diff --git a/package-lock.json b/package-lock.json
index b4e6b27911d..8f6a527627f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -23,8 +23,8 @@
"@angular/platform-browser": "20.3.16",
"@angular/platform-browser-dynamic": "20.3.16",
"@angular/router": "20.3.16",
- "@bitwarden/commercial-sdk-internal": "0.2.0-main.527",
- "@bitwarden/sdk-internal": "0.2.0-main.527",
+ "@bitwarden/commercial-sdk-internal": "0.2.0-main.522",
+ "@bitwarden/sdk-internal": "0.2.0-main.522",
"@electron/fuses": "1.8.0",
"@emotion/css": "11.13.5",
"@koa/multer": "4.0.0",
@@ -4981,9 +4981,9 @@
"link": true
},
"node_modules/@bitwarden/commercial-sdk-internal": {
- "version": "0.2.0-main.527",
- "resolved": "https://registry.npmjs.org/@bitwarden/commercial-sdk-internal/-/commercial-sdk-internal-0.2.0-main.527.tgz",
- "integrity": "sha512-4C4lwOgA2v184G2axUR5Jdb4UMXMhF52a/3c0lAZYbD/8Nid6jziE89nCa9hdfdazuPgWXhVFa3gPrhLZ4uTUQ==",
+ "version": "0.2.0-main.522",
+ "resolved": "https://registry.npmjs.org/@bitwarden/commercial-sdk-internal/-/commercial-sdk-internal-0.2.0-main.522.tgz",
+ "integrity": "sha512-2wAbg30cGlDhSj14LaK2/ISuT91XPVeNgL/PU+eoxLhAehGKjAXdvZN3PSwFaAuaMbEFzlESvqC1pzzO4p/1zw==",
"license": "BITWARDEN SOFTWARE DEVELOPMENT KIT LICENSE AGREEMENT",
"dependencies": {
"type-fest": "^4.41.0"
@@ -5086,9 +5086,9 @@
"link": true
},
"node_modules/@bitwarden/sdk-internal": {
- "version": "0.2.0-main.527",
- "resolved": "https://registry.npmjs.org/@bitwarden/sdk-internal/-/sdk-internal-0.2.0-main.527.tgz",
- "integrity": "sha512-dxPh4XjEGFDBASRBEd/JwUdoMAz10W/0QGygYkPwhKKGzJncfDEAgQ/KrT9wc36ycrDrOOspff7xs/vmmzI0+A==",
+ "version": "0.2.0-main.522",
+ "resolved": "https://registry.npmjs.org/@bitwarden/sdk-internal/-/sdk-internal-0.2.0-main.522.tgz",
+ "integrity": "sha512-E+YqqX/FvGF0vGx6sNJfYaMj88C+rVo51fQPMSHoOePdryFcKQSJX706Glv86OMLMXE7Ln5Lua8LJRftlF/EFQ==",
"license": "GPL-3.0",
"dependencies": {
"type-fest": "^4.41.0"
diff --git a/package.json b/package.json
index e09aba142fd..751c67afcd1 100644
--- a/package.json
+++ b/package.json
@@ -161,8 +161,8 @@
"@angular/platform-browser": "20.3.16",
"@angular/platform-browser-dynamic": "20.3.16",
"@angular/router": "20.3.16",
- "@bitwarden/commercial-sdk-internal": "0.2.0-main.527",
- "@bitwarden/sdk-internal": "0.2.0-main.527",
+ "@bitwarden/commercial-sdk-internal": "0.2.0-main.522",
+ "@bitwarden/sdk-internal": "0.2.0-main.522",
"@electron/fuses": "1.8.0",
"@emotion/css": "11.13.5",
"@koa/multer": "4.0.0",