Skip to content

fix(notifications): hide extension address from websites - #3767

Merged
smalluban merged 3 commits into
mainfrom
fix/embedded-frames-channel
Nov 18, 2026
Merged

smalluban merged 3 commits into
mainfrom
fix/embedded-frames-channel

Conversation

@chrmod

@chrmod chrmod commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

The picker popup, the notifications and the trackers preview reported to their content script with window.parent.postMessage(…, '*'). The page received those messages too, and with them the extension origin (on Firefox an identifier unique to the installation) and a handle to the frame.

  • All three now report to their content script over a private MessageChannel, so the page gets no message from them.
  • The trackers preview iframe moves into a closed shadow root, like the other two, so its URL cannot be read from the DOM.

Nothing changes for the user.

Testing

  • E2E on Firefox 157 and Chrome 157 (macOS). The element picker spec now also checks that no message from the popup reaches the page; it fails without this change. Notifications are opened and dismissed in the pause assistant spec and in the setup of every spec.
  • The trackers preview only runs on search result pages, which the E2E suite does not visit. I checked it by hand on a synthetic result page in both browsers: the popover opens, resizes and closes, and the page sees neither the iframe nor a message.
  • Not tested on Safari.

Not included

Scriptlets still receive the extension address for war: resources in the world of the page, where the page can observe it. Withholding it on Firefox would make those filters answer with an empty body, and custom-filters.spec.js expects the resource content there, so that needs a decision first.

Follows #3766.

@chrmod
chrmod force-pushed the fix/embedded-pages-hardening branch from 1809c18 to 651dc22 Compare November 16, 2026 12:36
@chrmod
chrmod force-pushed the fix/embedded-frames-channel branch from ba375a4 to 3579b32 Compare November 16, 2026 12:42
Base automatically changed from fix/embedded-pages-hardening to main November 16, 2026 17:53
@chrmod
chrmod force-pushed the fix/embedded-frames-channel branch from 3579b32 to f28bc34 Compare November 16, 2026 18:02
@chrmod
chrmod force-pushed the fix/embedded-frames-channel branch from f28bc34 to ee6fa56 Compare November 16, 2026 18:02
@chrmod
chrmod marked this pull request as ready for review November 16, 2026 18:10
@chrmod
chrmod requested a review from smalluban November 16, 2026 18:10
Comment thread src/utils/messaging.js Resolved
@chrmod
chrmod requested a review from smalluban November 17, 2026 10:21
Comment thread src/content_scripts/trackers-preview.js Resolved
Comment thread src/utils/messaging.js Resolved
@smalluban
smalluban merged commit a510d7c into main Nov 18, 2026
9 checks passed
@smalluban
smalluban deleted the fix/embedded-frames-channel branch November 18, 2026 12:18
@smalluban smalluban mentioned this pull request Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants