-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix: add world: MAIN to Firefox page script registration #17466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Great job! No new security vulnerabilities introduced in this pull request |
bc0ddf7 to
718e62d
Compare
718e62d to
b34bdd9
Compare
b34bdd9 to
0f23439
Compare
|
I'll analyze this and get back to you. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #17466 +/- ##
=======================================
Coverage 41.20% 41.20%
=======================================
Files 3543 3543
Lines 101912 101912
Branches 15282 15282
=======================================
+ Hits 41988 41995 +7
+ Misses 58159 58152 -7
Partials 1765 1765 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
* chore: update @types/firefox-webext-browser * fix: add world: MAIN to Firefox page script registration * review: add world property to registration type


🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-28387
sibling change from the same jira ticket: #17429
pr adding eslint rules to try to catch this pattern in the future: #17437
📔 Objective
This PR enhances how Firefox handles FIDO2 page script registration. The current MV2 implementation uses DOM script injection which exposes extension resource URLs in the page context where websites can observe them.
This PR adds the
world: "MAIN"parameter toregisterContentScriptsMv2()call in Firefox MV2 registration. This executes scripts directly in the page context without creating observable DOM elements.It might be wise to also review the HTML I used for testing. It is shared in the Recreation Steps in Jira.
Note For Autofill
Autofill, we are mixing team boundaries a bit here. This change is in autofill code but really page registration as a general concept is probably more of a platform domain. For now I've just made the change needed to patch this bug, but platform will be revisiting this in a later sprint to build out a page registration api your team can call. This is going to be planned on https://bitwarden.atlassian.net/browse/PM-28388
📸 Screenshots
Before and after with me locally serving the HTML shared in Jira
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:) or similar for great changes:memo:) or ℹ️ (:information_source:) for notes or general info:question:) for questions:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:) for suggestions / improvements:x:) or:warning:) for more significant problems or concerns needing attention:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt:pick:) for minor or nitpick changes