Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Issue 754713002: Allow arbitrary object-src CSP directives for component extensions (Closed)

Created:
6 years, 1 month ago by raymes
Modified:
6 years ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, arv+watch_chromium.org, extensions-reviews_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Allow arbitrary object-src CSP directives for component extensions This CL allows component extensions to specify arbitrary object-src CSP directives. This should be safe because non-NPAPI plugins should load in a sandboxed process and only allow communication via postMessage. Flash is an exception since it allows scripting into the embedder page, but even then it should disallow cross-origin scripting. At some point we may want to consider allowing this publicly. The CL refactors the CSP validator slightly to provide an options int to configure how CSP will be parsed. Tests are added for the changes above. BUG=416328 Committed: https://crrev.com/f43814b9553177aa71db780ddac7a3a4554a360c Cr-Commit-Position: refs/heads/master@{#305725}

Patch Set 1 #

Patch Set 2 : #

Total comments: 16

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -78 lines) Patch
M extensions/common/csp_validator.h View 1 2 3 2 chunks +14 lines, -1 line 0 comments Download
M extensions/common/csp_validator.cc View 1 2 3 4 5 5 chunks +14 lines, -12 lines 0 comments Download
M extensions/common/csp_validator_unittest.cc View 1 2 2 chunks +82 lines, -63 lines 0 comments Download
M extensions/common/manifest_handlers/csp_info.cc View 1 2 3 4 3 chunks +23 lines, -2 lines 0 comments Download

Messages

Total messages: 20 (3 generated)
raymes
6 years, 1 month ago (2014-11-24 03:28:20 UTC) #2
Sam McNally
https://codereview.chromium.org/754713002/diff/20001/extensions/common/csp_validator.h File extensions/common/csp_validator.h (right): https://codereview.chromium.org/754713002/diff/20001/extensions/common/csp_validator.h#newcode21 extensions/common/csp_validator.h:21: enum Options { Comments? https://codereview.chromium.org/754713002/diff/20001/extensions/common/csp_validator.h#newcode22 extensions/common/csp_validator.h:22: NO_OPTIONS = 0x00, ...
6 years, 1 month ago (2014-11-24 04:40:15 UTC) #3
not at google - send to devlin
lgtm https://codereview.chromium.org/754713002/diff/20001/chrome/browser/resources/pdf/pdf.js File chrome/browser/resources/pdf/pdf.js (right): https://codereview.chromium.org/754713002/diff/20001/chrome/browser/resources/pdf/pdf.js#newcode63 chrome/browser/resources/pdf/pdf.js:63: this.plugin_ = document.createElement('embed'); Could you make these changes ...
6 years ago (2014-11-24 18:18:03 UTC) #4
not at google - send to devlin
https://codereview.chromium.org/754713002/diff/20001/extensions/common/csp_validator_unittest.cc File extensions/common/csp_validator_unittest.cc (right): https://codereview.chromium.org/754713002/diff/20001/extensions/common/csp_validator_unittest.cc#newcode193 extensions/common/csp_validator_unittest.cc:193: "script-src *; object-src *;", ALLOW_INSECURE_OBJECT_SRC)); On 2014/11/24 18:18:03, kalman ...
6 years ago (2014-11-24 18:19:33 UTC) #5
not at google - send to devlin
Be aware of https://codereview.chromium.org/747403002/.
6 years ago (2014-11-24 18:26:48 UTC) #7
Mike West
On 2014/11/24 18:26:48, kalman wrote: > Be aware of https://codereview.chromium.org/747403002/. Given that flash can hop ...
6 years ago (2014-11-24 18:42:18 UTC) #8
raymes
Hey Mike. Thanks for commenting about flash, it's a good point and I forgot that ...
6 years ago (2014-11-24 23:16:41 UTC) #9
raymes
Actually can we allow this CL to go ahead for now given that we're only ...
6 years ago (2014-11-25 00:52:10 UTC) #10
Mike West
On 2014/11/25 00:52:10, raymes (OOO 11-27 to 12-14) wrote: > Actually can we allow this ...
6 years ago (2014-11-25 08:05:33 UTC) #11
raymes
Ok, thanks Mike, that sounds reasonable. Since this CL has been reviewed and it's also ...
6 years ago (2014-11-25 13:34:11 UTC) #12
Mike West
LGTM, given the other CL. Thanks!
6 years ago (2014-11-25 13:50:52 UTC) #13
not at google - send to devlin
> Could we adjust the change such that we'd allow `object-src *` if and only ...
6 years ago (2014-11-25 16:36:28 UTC) #14
not at google - send to devlin
Ah you broke it off into another CL. I don't need to look at this ...
6 years ago (2014-11-25 17:04:04 UTC) #15
raymes
On 2014/11/25 17:04:04, kalman wrote: > Ah you broke it off into another CL. I ...
6 years ago (2014-11-25 22:19:20 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/754713002/100001
6 years ago (2014-11-25 22:20:29 UTC) #18
commit-bot: I haz the power
Committed patchset #6 (id:100001)
6 years ago (2014-11-25 23:25:13 UTC) #19
commit-bot: I haz the power
6 years ago (2014-11-25 23:26:10 UTC) #20
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/f43814b9553177aa71db780ddac7a3a4554a360c
Cr-Commit-Position: refs/heads/master@{#305725}

Powered by Google App Engine
This is Rietveld 408576698