-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
[BUG] CSP Restriction for TrustedTypePolicy Creation in Loading Indicator #985
Comments
I had the same issue, please merge the fix related ❤️ |
Had the same issue. Thanks for fixing this 🙏 Anything we can do to speed up merging? |
Having the same issue in the developer mode preventing any content scripts from getting executed. Please fix this asap. Here is the description of the error "Refused to create a TrustedTypePolicy named 'trusted-html-plasmo-loading' because it violates the following Content Security Policy directive: "trusted-types 'allow-duplicates' default jSecure highcharts dompurify". |
I made a fix guys #986 Building and Linking Plasmo is explained here |
error on LinkedIn, right? |
@HT808s can you check if the latest merge fix the issue :-? |
@louisgv Just tried with the version 0.87.1, it didn't |
Same for me |
Same, version 0.87.1 still got the error... |
Temporary Fix for CSP IssueI found a temporary fix for the CSP issue that could help someone smarter resolve it altogether. Steps to Reproduce:
function F() {
let e = globalThis.window?.trustedTypes;
if (!(typeof e > "u"))
return $(), e.createPolicy(`jSecure`, {
createHTML: (t) => t
});
} This should work on every refresh since the Plasmo modal which has the bug gets loaded only on the initial |
Works, but when you make changes, it just gets reset to the one produced by the build |
I think with #1000 (1000!!), this should now be fixed. Released in https://github.com/PlasmoHQ/plasmo/releases/tag/v0.87.2 Thanks @agungjk! |
Temporary Fix for CSP Issuejust exec below code in chrome console when linkedin is loading
|
What happened?
A bug happened in plasmo dev mode!
As I understand it, it seems that some CSP in some pages can prevent execution of createPolicy, which results in the code injection of the extension to break
I tried changing the meta tag in the page before executing that code and it worked
Version
Latest
What OS are you seeing the problem on?
MacOSX
What browsers are you seeing the problem on?
Chrome
Relevant log output
(OPTIONAL) Contribution
Code of Conduct
The text was updated successfully, but these errors were encountered: