From 253a4e573c51d06d32303c21fcd1b7d2ea89d2f2 Mon Sep 17 00:00:00 2001 From: Addison Beck Date: Wed, 19 Nov 2025 15:13:41 -0500 Subject: [PATCH] fix: add world: MAIN to Firefox page script registration (#17466) * chore: update @types/firefox-webext-browser * fix: add world: MAIN to Firefox page script registration * review: add world property to registration type --- .../fido2/background/abstractions/fido2.background.ts | 1 + .../autofill/fido2/background/fido2.background.spec.ts | 1 + .../src/autofill/fido2/background/fido2.background.ts | 1 + package-lock.json | 8 ++++---- package.json | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/browser/src/autofill/fido2/background/abstractions/fido2.background.ts b/apps/browser/src/autofill/fido2/background/abstractions/fido2.background.ts index 6ad069ad56e..b341be28ebb 100644 --- a/apps/browser/src/autofill/fido2/background/abstractions/fido2.background.ts +++ b/apps/browser/src/autofill/fido2/background/abstractions/fido2.background.ts @@ -13,6 +13,7 @@ type SharedFido2ScriptRegistrationOptions = SharedFido2ScriptInjectionDetails & matches: string[]; excludeMatches: string[]; allFrames: true; + world?: "MAIN" | "ISOLATED"; }; type Fido2ExtensionMessage = { diff --git a/apps/browser/src/autofill/fido2/background/fido2.background.spec.ts b/apps/browser/src/autofill/fido2/background/fido2.background.spec.ts index 752851b3d37..adb59b8f845 100644 --- a/apps/browser/src/autofill/fido2/background/fido2.background.spec.ts +++ b/apps/browser/src/autofill/fido2/background/fido2.background.spec.ts @@ -203,6 +203,7 @@ describe("Fido2Background", () => { { file: Fido2ContentScript.PageScriptDelayAppend }, { file: Fido2ContentScript.ContentScript }, ], + world: "MAIN", ...sharedRegistrationOptions, }); }); diff --git a/apps/browser/src/autofill/fido2/background/fido2.background.ts b/apps/browser/src/autofill/fido2/background/fido2.background.ts index 22ee4a1822d..a8b016a14d6 100644 --- a/apps/browser/src/autofill/fido2/background/fido2.background.ts +++ b/apps/browser/src/autofill/fido2/background/fido2.background.ts @@ -176,6 +176,7 @@ export class Fido2Background implements Fido2BackgroundInterface { { file: await this.getFido2PageScriptAppendFileName() }, { file: Fido2ContentScript.ContentScript }, ], + world: "MAIN", ...this.sharedRegistrationOptions, }); } diff --git a/package-lock.json b/package-lock.json index 68f2ca45d6d..7a34666e5bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -101,7 +101,7 @@ "@storybook/web-components-webpack5": "8.6.12", "@tailwindcss/container-queries": "0.1.1", "@types/chrome": "0.1.12", - "@types/firefox-webext-browser": "120.0.4", + "@types/firefox-webext-browser": "143.0.0", "@types/inquirer": "8.2.10", "@types/jest": "29.5.14", "@types/jsdom": "21.1.7", @@ -14070,9 +14070,9 @@ "license": "MIT" }, "node_modules/@types/firefox-webext-browser": { - "version": "120.0.4", - "resolved": "https://registry.npmjs.org/@types/firefox-webext-browser/-/firefox-webext-browser-120.0.4.tgz", - "integrity": "sha512-lBrpf08xhiZBigrtdQfUaqX1UauwZ+skbFiL8u2Tdra/rklkKadYmIzTwkNZSWtuZ7OKpFqbE2HHfDoFqvZf6w==", + "version": "143.0.0", + "resolved": "https://registry.npmjs.org/@types/firefox-webext-browser/-/firefox-webext-browser-143.0.0.tgz", + "integrity": "sha512-865dYKMOP0CllFyHmgXV4IQgVL51OSQQCwSoihQ17EwugePKFSAZRc0EI+y7Ly4q7j5KyURlA7LgRpFieO4JOw==", "dev": true, "license": "MIT" }, diff --git a/package.json b/package.json index 181e003bf28..4caa88e9850 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@storybook/web-components-webpack5": "8.6.12", "@tailwindcss/container-queries": "0.1.1", "@types/chrome": "0.1.12", - "@types/firefox-webext-browser": "120.0.4", + "@types/firefox-webext-browser": "143.0.0", "@types/inquirer": "8.2.10", "@types/jest": "29.5.14", "@types/jsdom": "21.1.7",