Skip to content
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

Allow adding "blob" as source in JSON #17

Closed
daniplaninc opened this issue Oct 18, 2017 · 3 comments
Closed

Allow adding "blob" as source in JSON #17

daniplaninc opened this issue Oct 18, 2017 · 3 comments

Comments

@daniplaninc
Copy link

I would like to do this:

"img-src": {
"self": true,
"data": true,
"blob": true
},

However, the "blob":true has no effect. I can resolve this by adding it in the other way:

$csp->addSource('image-src', "blob:");

but that results in having to look at annoying error messages in the console:
1

As a solution I would also accept any way to remove the automatic addition of "http://blob" and "https://blob" to the source list.

@paragonie-scott
Copy link
Member

This is the first I've heard of blob: being a thing. I thought only data: URIs were standard?

@daniplaninc
Copy link
Author

I am using Sir Trevor, which stores an image blob on the site temporarily, that is when I get the CSP error:
Refused to load the image 'blob:<image-name>' because it violates the following Content Security Policy directive: "img-src ...

blob: is listed here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/img-src

@paragonie-scott
Copy link
Member

Sorry, I missed this somehow.

This will be fixed in v2.3.0, which will be released sometime today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants