Skip to content

Allow blob: protocol - #2166

Merged
HelloZeroNet merged 2 commits into
HelloZeroNet:py3from
purplesyringa:patch-1
Aug 20, 2019
Merged

Allow blob: protocol#2166
HelloZeroNet merged 2 commits into
HelloZeroNet:py3from
purplesyringa:patch-1

Conversation

@purplesyringa

Copy link
Copy Markdown
Contributor

Fixes #2165

@ValdikSS

Copy link
Copy Markdown

I believe blob: should not be in quotes.

headers["Content-Security-Policy"] = "default-src 'none'; script-src 'nonce-{0}'; img-src 'self' blob:; style-src 'self' 'unsafe-inline' blob:; connect-src *; frame-src 'self' blob:".format(script_nonce)

That way it works in Firefox and Chrome.
This modification should be reviewed by a web security specialist since it may introduce unwanted functionality or a security vulnerability.

@purplesyringa

Copy link
Copy Markdown
Contributor Author

Fixed quotes.

As for me, I don't see any possible security issues here: it's blob after all.

@HelloZeroNet
HelloZeroNet merged commit 24b3651 into HelloZeroNet:py3 Aug 20, 2019
@purplesyringa
purplesyringa deleted the patch-1 branch August 20, 2019 11:16
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

Successfully merging this pull request may close these issues.

Add blob: scheme to Content-Security-Policy

3 participants