Skip to content
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

Extension in a default-src 'self' CSP environment causes page load to fail #1519

Open
robinwhittleton opened this issue Sep 15, 2024 · 5 comments

Comments

@robinwhittleton
Copy link

Intended outcome:

Load a page with a CSP of default-src 'self'; (in this case https://standardebooks.org/). The page is expected to load and render regardless of the CSP settings.

Actual outcome:

Blank screen, and CSP errors in the console. This was originally reported at standardebooks/web#397.

How to reproduce the issue:

Visit https://standardebooks.org/, observe blank page, observe errors in the console.

Desktop (please complete the following information):

  • OS: [e.g. iOS] macOS 14.6.1
  • Browser [e.g. chrome, safari] Firefox
  • Browser version [e.g. 22] I tested in Nightly
  • Extension version [e.g. 3.0] 4.18.6
@phryneas
Copy link
Member

That is curious - a CSP blocking JS execution should to my knowledge just not execute that JS (and issue a warning) - but never crassh the whole page.

I'll investigate.

@phryneas
Copy link
Member

Note: this only seems to happen in Firefox, not in Chrome.

@phryneas
Copy link
Member

Irritatingly, if I build the extension locally, it neither crashes Firefox nor Chrome.

@phryneas
Copy link
Member

While I can't find a way to really prevent this, the same is happening with the Redux DevTools and the React DevTools.

I can't really imagine that this has gone unnoticed for so long... maybe it's a regression in Firefox itself?

As I already said, I would expect FF to just continue going after a warning, not crash the whole page 🤔

@phryneas
Copy link
Member

I had a chat with the maintainer of the Redux Devtools about this, this could be the way to go @jerelmiller

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants