Skip to content

fix: Firefox XRay vision prevents window<->content script messaging#83

Merged
danpastori merged 1 commit intoserversideup:mainfrom
StyleT:patch-1
Apr 16, 2024
Merged

fix: Firefox XRay vision prevents window<->content script messaging#83
danpastori merged 1 commit intoserversideup:mainfrom
StyleT:patch-1

Conversation

@StyleT
Copy link
Copy Markdown
Contributor

@StyleT StyleT commented Mar 25, 2024

As current code modifies original message it causes the following error in latest version of Firefox:

Not allowed to define cross-origin object as property on [Object] or [Array] XrayWrapper
    <anonymous> content-script.js:26
    portP chunk-ICLXI4BR.js:56
    (Async: EventHandlerNonNull)
    acceptMessagingPort chunk-ICLXI4BR.js:8
    (Async: EventListener.handleEvent)
    promise chunk-ICLXI4BR.js:28
    getMessagePort chunk-ICLXI4BR.js:3
    setNamespace chunk-ICLXI4BR.js:56
    allowWindowMessaging content-script.js:46

More about Xray Vision here: https://firefox-source-docs.mozilla.org/dom/scriptSecurity/xray_vision.html

@StyleT
Copy link
Copy Markdown
Contributor Author

StyleT commented Mar 25, 2024

@StyleT
Copy link
Copy Markdown
Contributor Author

StyleT commented Apr 2, 2024

@danpastori @jaydrogers kind reminder here 👀

@StyleT
Copy link
Copy Markdown
Contributor Author

StyleT commented Apr 16, 2024

@danpastori @jaydrogers Hi! Another very kind reminder to merge and publish this

@danpastori danpastori merged commit bd3dad9 into serversideup:main Apr 16, 2024
@danpastori
Copy link
Copy Markdown
Collaborator

@StyleT This looks great here, I'll get this merged. Thanks so much for the contribution!

@CharlieDigital
Copy link
Copy Markdown

Ran into this issue today.

package.json:

  "dependencies": {
    ...
    "webext-bridge": "^6.0.1"
  },

What the debug console is showing:

image

And it looks like it didn't make it into the Apr 07 package:

https://www.npmjs.com/package/webext-bridge?activeTab=code

Is there a plan to ship this?

@StyleT
Copy link
Copy Markdown
Contributor Author

StyleT commented Jul 25, 2024

@CharlieDigital I ended up fixing it in @webext-pegasus/rpc

@CharlieDigital
Copy link
Copy Markdown

@StyleT thanks for the pointer; will check it out

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.

3 participants