web-monetization-projects
web-monetization-projects copied to clipboard
Firefox background page content_security_policy violation

Content Security Policy: The (nb: background) page’s settings blocked the loading of a resource at eval (“script-src”). moz-extension:44210:9
Don't know what it is yet.
Is on main
and the wm2 branch.
Versions:
- MacOS Firefox Version 98.0.1 (64-bit)
- MacOS Firefox Version 100.0a1 (2022-03-15) (64-bit)
The CSP issue is caused by an eval function being called in the background.js file that is compiled by webpack.
A temporary solution is:
add the following script-src directive value to the content_security_policy
field in manifest.json
'unsafe eval'
This should be last resort as it allows for some vulnerability