-
Notifications
You must be signed in to change notification settings - Fork 152
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
Fix content security policy #2
Conversation
Images and favicons don't load for the suspended page because content security policy changes done to remove tracking/analytics resources also took out `data:` and `chrome:` resources. This change fixed it for me
I suspect the error you are fixing is the one I am seeing:
I will try your patch. |
For others: This did fix the error message and ThePrivateSuspender is back in action! Thanks! |
I downloaded the Quinci fork and directly loaded it with chrome but I'm still presenting the same issue, any ideas? |
My only thought is to confirm you removed the old version first (after unsuspending all tabs) ? I have done this on two browsers with success. I have quite a few extensions installed, so not like I have an empty browser that would not conflict. |
I get a LOT of errors while installing thegreatsuspender-notrack-master.zip from Quinci135 (removed original extension first) `Refused to load the image 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABMklEQVQ4T2NkQAPqMz+sZ2RgCPjPwMDACJWDsf8zMqy9mSYQgqwFpgYupjHrw+r//xnAikCScM0gPiPDihtpApEoBmyZXjON4T9DZidzCljxawYBsDyyyTBDQGLCDB/AcuV/54AUTWfcMq3mv4W+KrpPiOKfuHibYRAa8PnrdwZebk7SvfD//3+GSYs3M7TPWc+wsC2fwd3GAMWQv//+MRS2z2a4ce8pw8apNQycHGwMKGHw798/Bm3fHIbXH74yuFnqMizrKUEx4PvPXwyOCTUMdx69ZLi1bSqDED8PqgEg1Y9fvmHYffQCQ6i7NdgbG/adZLh68yGDka4qg6eNIcPPX7/BmI+HC2w4wVi4eucxQ3nvfIbO4gQGbRU5jHAhaAChkBw2BkAzEyH/YpVnZJgOAMmupQe5ogszAAAAAElFTkSuQmCC' because it violates the following Content Security Policy directive: "img-src 'self'". Refused to load the image 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAlUlEQVRYR+2XQQ7AIAgE8Zt8pvUzfLMNSXurhW3WmCZ4RWUcxWiTxa0tzi9DAFU9QLhuZjs4hgrguWGI0ICZvW7TgykIggnQRWS7tiANQQNwU6rqZwCCoAL46lEIOgAKMQUAgaABRPU/qqb/A0Qrv++JaQYKoAyUgTJQBspAGZhuIEqQjX9+D2QTRP1ggGhCVnz57/gEwPfpITHekWIAAAAASUVORK5CYII=' because it violates the following Content Security Policy directive: "img-src 'self'". Refused to load the image 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAYklEQVQ4T2NkoBAwIuuPior6j8O8xmXLljVgk8MwYNmyZdgMfcjAwLAAmyFEGfDv3z9FJiamA9gMIcoAkKsiIiIUsBlClAHofkf2JkED0DWDAnrUgOEfBsRkTpzpgBjN6GoA24V1Efr1zoAAAAAASUVORK5CYII=' because it violates the following Content Security Policy directive: "img-src 'self'". Refused to load the image 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADyElEQVRYR8VXTYgbZRh+3m+SrWvZil7WQxWKIL1YQRAKKlYQQbzpRas02d3ZbWZxtQVbRC/jwR9aodXYndk42U1ErYiKFw+ChxbtQbZe6smCVGgLrkiLu9XSJPs9MrOZ7GQySSZ7yUAgM+/f8/5+7ycY8iNDto+BAEwVCs/rdSlozT0AtgPINh2oA/hXKbmgDLpl1/0irWOpAByYOXhMGvIqBCOpFBM1ZvjBJ6WFo/34ewIwzbnHGmh8R3Ksn6IkuoisZZB5xvOKP3aT7wpgwiy8ooETIFRMuAZgWUSWRfEiqQTkbhKTAP20tD8CrYDDS577YSLIpI+BceIksFkjAvxDkaO7do5XbNv2QbSe3PTsi9D60x5R8mEeSgLREQE/7HXUz0Q9F5FvxkYz+4vF4q0kI3nT+ozk/p5pEugssvvi6egAkDet1WjOR...6GRW4IeJHAb6Lky0rJ+TbKO2FaLxF8n8R4pJhvgnhPlPxNrU81O4HVxU4ArRSk9lzw1Y7R7FSxWFwNZfK2fRuu/rVboHcCsjaalV/m5+dv5E0r2jmJKYgWYXoMArviuW/1E8hNFX4C8EiTr7MIY23YT98mXeT69hG51/eym5Bt2yOXLv+5FinysxUv1oYdgyg9BGRFHvQ850KvtgW5ENITB5FPjI7iAexDGcbepdKpn5Nk5ubmtq39V18hcEezAJNHcQBg2joOzdd6G5dVCK5GeQzDOLC48NH5JLm8aX1N8tmQ1vMw8pnix3GHUsHpquf2PvubQnnTepvkG6GOvsfxxkDpXEjaQKQAEIT9ZuPzqOdIu5D4xpJWss3B0j0CQbVfWckLeayV8w3B9CtZaKj7UsoaIMtK4Rwov0PRoJb7ST4MwP+1r+5bWUpDEENdy6N5H9rFJN4BQ7uaDTKUBuVNdTccVOkg/P8DOQvDMDxZB4AAAAAASUVORK5CYII=' because it violates the following Content Security Policy directive: "img-src 'self'". Refused to load the image 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAB3UlEQVQ4T6WTP2hTURjFz7nP2EpxK0pBEFwcnDu3ZMiQWSKK0CQmmgSHVgdBUPEPoqBYHJLQvuZPEZSAq2CGqoOLLi4ijrqIXcVom+Qeua95+VONS+/0OJfvd893vu8RezzcXX92cXEm8nPrqYRZSQfcPclfJN63pyZOP1le/jZcMwJInS8sqWvvC4iQsBA2BbYBHQk4QJueuVJdKT4KIX2AK7Zd+xCAJXEzHoveTSQS3WTm4rzUeTX0qoxnLoeQAOBsez+2vgKiJ56oVEqfnZ7KFB5Y2DMQZnbZbncOTh517QSAVDb/2lrNkbhe88u3nZbMFmZl7btxGRvDN9XV0nwAWEjnWjSYiMei+53tHnROVsUe4JiAyREXZKvml6Z2AOdylsD32lp5xGpYkMzkn0k6NQBoG2CkvlY2fYBLeeiFLsEvoNbjseidZvPtdEfbSyCmIbwE9FjA4QEgnWuBCGa++3g0CxW/uB7qjUbDe9HccA5+91sIQ/xnYORK3S9dGLSTuybh1kiIQ2Pc14eQPoAPBvpU9csbTk+n88e71EcCdmSMQeqDRdrJwuBkfbX83H32bF+VcMPd/LVIfXvZ/CVY3XOrDKJDYBOCAXFIgkt8/CqHkD39TOO27n/6HyyR4xF0kx9xAAAAAElFTkSuQmCC' because it violates the following Content Security Policy directive: "img-src 'self'". Refused to load the image 'chrome://favicon/size/16@2x/http://chromeDefaultFavicon' because it violates the following Content Security Policy directive: "img-src 'self'". Refused to load the image 'chrome://favicon/size/16@2x/chromeDefaultFavicon' because it violates the following Content Security Policy directive: "img-src 'self'". Uncaught (in promise) TypeError: Cannot read property 'normalisedDataUrl' of undefined Any idea? |
Steps I took to fix this:
Alternately, you can install the old 7.1.6 version in the same way (without the editing of manifest.json) by downloading the release: https://github.com/greatsuspender/thegreatsuspender/archive/v7.1.6.zip |
My apologies for not understanding the required I've tested and this does solve the favicon issue; so I've amended the code and released a new version here. Thank you! |
@aciidic still have a bunch of errors in your newest release, not sure it's been fully fixed?
|
I can't seem to replicate those errors, it seems to be fine for me. Are you using latest crx file from releases? I messed up the source on the release, if you're creating from source then use the very latest master branch in this repo |
Instead of downloading from master, I did a git clone. Now I have a different error, but it seems to not be relevant since it says
|
Images/icons/favicons don't load for the suspended page because content security policy changes done to remove tracking/analytics resources also took out
data:
andchrome:
resources. This change fixed it for meRemoved here:
2b6225c#diff-6bc2c0b5164076a1b57b067398be19a40d2b8efa3428b03504562ea88593866cL52