Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Content Security Policy fixes #11552

Merged
merged 1 commit into from
May 19, 2016
Merged

Content Security Policy fixes #11552

merged 1 commit into from
May 19, 2016

Conversation

ggreer
Copy link
Contributor

@ggreer ggreer commented Apr 20, 2016

Add blob: protocol to img-src and media-src sources. Add data: and mediastream: protocols to media-src.

These changes are needed to fix video chat in the Floobits Atom plugin (issue Floobits/floobits-atom#114). A CSP directive of default-src: * doesn't cover protocols like blob:, data:, or mediastream:, which the Floobits package uses.

…a-src sources. Add data: and mediastream: protocols to media-src.
@ggreer
Copy link
Contributor Author

ggreer commented Apr 21, 2016

I'm not sure what the Travis CI failure is about. It looks like some sort of unrelated timeout.

@lee-dohm lee-dohm added the atom label Apr 21, 2016
@mertkahyaoglu
Copy link
Contributor

I need this in my project as well. The code below is not working right now;
video.src = window.URL.createObjectURL(stream)

@ggreer
Copy link
Contributor Author

ggreer commented May 9, 2016

Can you please merge my PR? This bug is costing me money.

@lee-dohm
Copy link
Contributor

We're still looking in to this to ensure there aren't any unforeseen consequences. Relaxing the security could cause problems that we haven't seen before. The developers are looking into it and if they give the thumbs up, we'll go ahead and merge this. I'll have another update for you on Friday.

@ggreer
Copy link
Contributor Author

ggreer commented May 19, 2016

This patch actually gets CSP behavior closer to what it used to be. Chromium has been tightening down how they parse CSP headers. The CSP line in the Atom source has been the same for years, but only recently did a new enough version of Chromium (in the form of Electron) ship in Atom to cause breakage.

See https://bugs.chromium.org/p/chromium/issues/detail?id=473904 for more patchsets related to stricter CSP parsing.

@lee-dohm
Copy link
Contributor

Talked it over with the devs and the security experts. They gave the 👍

@lee-dohm lee-dohm merged commit 43e5359 into atom:master May 19, 2016
BinaryMuse pushed a commit that referenced this pull request May 19, 2016
Content Security Policy fixes
BinaryMuse pushed a commit that referenced this pull request May 19, 2016
Content Security Policy fixes
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants