Skip to content

Inpage injection fails in Firefox under some CSP settings #3133

@marcusmolchany

Description

@marcusmolchany

Hey, as far as I can tell, my content security policy is preventing MetaMask from injecting its scripts. This is only happening in Firefox. It works correctly in Chrome, Safari, Opera, and Brave. My script-src directive looks like this:

script-src 'self';

and I'm seeing this csp violation in the js console:

Content Security Policy: The page’s settings blocked the loading of a resource at self. Source: (function e(t,n,r){function s(o,u){if(!n ....

Unfortunately Firefox only shows a preview of the blocked script. I've tried sha256 hashing each of the scripts in the latest Metamask release and adding them to the CSP, but that did not work. If you have any ideas that would be great!

Browser: Firefox 58.0.1
Operating System: Mac OSX 10.13.2

Metadata

Metadata

Assignees

Labels

Sev2-normalNormal severity; minor loss of service or inconvenience.area-injectionRelating to how the JS interface is injected into a website.browser-firefoxrelease-12.8.0Issue or pull request that will be included in release 12.8.0team-extension-platformExtension Platform teamtype-bugSomething isn't working

Type

No type

Projects

Status

To be triaged

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions