Ignore CSP for blob URIs with moz-extension origin
Categories
(WebExtensions :: Request Handling, defect, P3)
Tracking
(Not tracked)
People
(Reporter: bugzilla.mozilla.org, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: triaged)
Updated•8 years ago
|
Updated•8 years ago
|
Updated•8 years ago
|
Comment 3•7 years ago
|
||
Comment 5•7 years ago
|
||
Comment 7•7 years ago
|
||
Comment hidden (me-too) |
Updated•6 years ago
|
Comment 10•6 years ago
|
||
Updated•5 years ago
|
Comment 11•5 years ago
|
||
as @The 8472 told, I moved my extensions "export setting" functionality from browser_action popup to background script to overcome this bug, but lately noticed that some extensions (such as FoxyProxy) do it on browser_action without problem, Don't know how.
Updated•4 years ago
|
Updated•2 years ago
|
Comment 12•2 years ago
|
||
Hello,
https://cdn.discordapp.com/attachments/812577823599755274/1050478758987042868/image.png
As you can see in the picture web workers are getting blocked because of the Content Security Policy.
Can blob:moz-extension be added to to CSP for extensions?
Comment 13•2 years ago
|
||
Please fix this. It prevents us from using qr-scanner
in our Alby browser extension (https://addons.mozilla.org/en-US/firefox/addon/alby/), see: https://github.com/nimiq/qr-scanner/issues/217
Comment 14•2 years ago
|
||
Hello team, this issue severly limits extension's ability to provide basic features. It's a commonly hit limitation, as file generations fail and even javascript libraries like Tesseract cannot be used locally in extensions.
Can you revise the priority of this issue?
Comment 15•2 years ago
|
||
(In reply to nicram606 from comment #14)
Hello team, this issue severly limits extension's ability to provide basic features. It's a commonly hit limitation, as file generations fail and even javascript libraries like Tesseract cannot be used locally in extensions.
Can you revise the priority of this issue?
I just took a look into tesseract.js options and it seems they provide one that may be helpful to workaround the issue you are hitting on the blob urls:
- it seems that in tesseract.js
createWorker
api docs here there is a mention to aworkerBlobURL
option that can be set tofalse
to explicitly disable the use of a blob url for the tesseract worker - an existing Firefox WebExtensions (the one listed in tesseract.js README.md) seems to be using that internally here: https://github.com/gnonio/korporize/blob/5e5aa20892d127327811c318a78ff797412e7914/background.js#L112-L117
(I haven't checked if the qr-scanner, or some other js/wasm-based library providing the same functionality supports something similar, but it seems not unlikely to be an enhancement that other libraries besides tesseract.js may be willing to support).
On the more general request to exempt moz-extension blob URLs from CSP checks, in light of the additional restrictions related to remote code execution introduced in manifest_version 3 WebExtensions, it is unlikely that we would broadly exempt moz-extension: blob urls from CSP checks.
The same should be the case for manifest_version 3 extension also on Google Chrome.
Nonetheless we are interested in learning of use cases hitting the issues and help extension developers to look for solutions that could unblock those use cases, on a case by case basis.
And so, even if the team agreed on wontfixing this particular issue related to "exempt all moz-extension: blob urls from CSP checks", use cases that seems to not be possible because currently hitting this kind of issues and didn't got any reasonable way to workaround yet are still valuable to be reported as separate bugs (bugs focused on the particular use case that doesn't seem to be achievable, instead of bugs focused on this particular proposed solution).
Description
•