-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
WASM compilation is disabled by default in Chromium extensions #751
Comments
Maybe we could use |
The CSP has been added at the beginning of 2017 : https://codereview.chromium.org/2646713002/ |
Originally posted by @Jaifroid in #722 (comment) I did not find the iframe CSP in kiwix-js. There is one in kiwix-js-windows : https://github.com/kiwix/kiwix-js-windows/blob/56160448e04484525d5692471ed9a9c47d370192/www/js/app.js#L3669 (only for jQuery mode?), and we discussed about another one in #404 (but it's not implemented yet and was not trivial) Our browser extension does not ask for any permission in its manifest. So, even if a ZIM file tries to bad things (or if it has been compromised), kiwix-js can not harm the rest of the browser sensitive information (other tabs, storage, etc). So, in the short term, I suggest to add the In the mid-term, we could :
|
Add a CSP to allow WASM in Chromium extensions Fixes #751
The decompressor API is red and its status is "Error loading ZSTD decompressor!".
In the browser console :
And nothing works afterwards.
It comes from a CSP applied on Chromium extensions (not on Firefox extensions), for security reasons.
It can be overridden by adding a line in manifest.json, see https://stackoverflow.com/questions/48523118/wasm-module-compile-error-in-chrome-extension . It seems to work with both
unsafe-eval
orwasm-eval
, and does not seem to annoy Firefox.Is it risky to do that?
Should we use
unsafe-eval
(that probably works with all versions of Chromium, but opens more security risks) orwasm-eval
(that opens less security risks, but might not work with all versions of Chromium)?The text was updated successfully, but these errors were encountered: