standardnotes / desktop

[Moved to https://github.com/standardnotes/app] A free, open-source, and end-to-end encrypted notes app. https://standardnotes.com
GNU Affero General Public License v3.0
1.4k stars 115 forks source link

Cannot add theme due to CSP #867

Closed 13zebras closed 2 years ago

13zebras commented 2 years ago

After following your directions step by step here: https://docs.standardnotes.com/extensions/local-setup

I received the error below in the console in SN 3.14.1

app.js:2 Refused to load the stylesheet 'http://localhost:8001/new.css' because it violates the following Content Security Policy directive: "style-src 'unsafe-inline' 'self' http://127.0.0.1:45653". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.

I would suggest either an update to provided instructions as to how to mitigate this error OR some change internally to make this error discontinue. It makes SN unusable as I need a custom theme to account for my visual difficulties. I had one created and used locally until an update last year modified how themes work at the local level. Now SN is unusable.

moughxyz commented 2 years ago

Can you try http://127.0.01/new.css? We'll introduce a patch not in the next release (scope is frozen for that), but the one after.

13zebras commented 2 years ago

Same with http://127.0.0.1/new.css or http://127.0.0.1:8001/new.css

I can open the .css file in a browser at http://127.0.0.1:8001/new.css or localhost

And SN will not load the ext.json file without the port number 8001.

When will the release happen with the patch? Thanks.

kylejbrk commented 2 years ago

Having the same issue and would like to know the resolution

moughxyz commented 2 years ago

Fixed by https://github.com/standardnotes/desktop/commit/62e99c1b6c5f31e36c5d8922a99d93212b6f84cc. Will be included in upcoming release (early next week).