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

Issue 722233004: Accept invalid chrome-extension:// and chrome:// CSP tokens (Closed)

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

Description

Accept invalid chrome-extension:// and chrome:// CSP tokens Do not refuse to load the extension when the CSP contains "chrome-extension://", because there are some extensions in the wild that contains this token in the CSP. It is safe to accept this token because the invalid CSP token is ignored by Blink (together with an error message in the console, so the developer can fix the problem if they bother to look at the console). BUG=432227 R=kalman@chromium.org Committed: https://crrev.com/087183913f74ebd1e18964fabd269dfebb4763f3 Cr-Commit-Position: refs/heads/master@{#304922}

Patch Set 1 #

Patch Set 2 : Add test #

Patch Set 3 : Simplify patch - just accept any empty host #

Total comments: 2

Patch Set 4 : Add extra comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -1 line) Patch
M extensions/common/csp_validator.cc View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M extensions/common/csp_validator_unittest.cc View 1 2 3 2 chunks +8 lines, -1 line 0 comments Download

Messages

Total messages: 27 (4 generated)
robwu
6 years, 1 month ago (2014-11-13 23:02:41 UTC) #1
robwu
Ben, could you quickly take a look at this? If we wait a few more ...
6 years, 1 month ago (2014-11-17 23:41:58 UTC) #2
not at google - send to devlin
I'd like to see this backed up with tests. But I'd also like to see ...
6 years, 1 month ago (2014-11-18 01:29:39 UTC) #3
robwu
On 2014/11/18 01:29:39, kalman wrote: > I'd like to see this backed up with tests. ...
6 years, 1 month ago (2014-11-18 01:41:45 UTC) #4
not at google - send to devlin
Skipping invalid tokens sounds even better, hopefully there is already something which has implemented parsing ...
6 years, 1 month ago (2014-11-18 16:11:04 UTC) #5
robwu
Aw. 39 shipped and broke an extension with 400k users: https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo/support kalman, can we ship ...
6 years, 1 month ago (2014-11-19 09:19:45 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/722233004/80001
6 years, 1 month ago (2014-11-19 12:46:48 UTC) #10
commit-bot: I haz the power
Committed patchset #3 (id:80001)
6 years, 1 month ago (2014-11-19 13:27:45 UTC) #11
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/67244e678279741947c09ba2ab18fbfec1707a97 Cr-Commit-Position: refs/heads/master@{#304799}
6 years, 1 month ago (2014-11-19 13:28:23 UTC) #12
not at google - send to devlin
Wuh, how did this land, there was never an lg?
6 years, 1 month ago (2014-11-19 17:27:29 UTC) #13
not at google - send to devlin
Please revert.
6 years, 1 month ago (2014-11-19 17:28:13 UTC) #14
robwu
On 2014/11/19 17:27:29, kalman wrote: > Wuh, how did this land, there was never an ...
6 years, 1 month ago (2014-11-19 17:31:27 UTC) #15
not at google - send to devlin
https://codereview.chromium.org/722233004/diff/80001/extensions/common/csp_validator_unittest.cc File extensions/common/csp_validator_unittest.cc (right): https://codereview.chromium.org/722233004/diff/80001/extensions/common/csp_validator_unittest.cc#newcode101 extensions/common/csp_validator_unittest.cc:101: EXPECT_TRUE(ContentSecurityPolicyIsSecure( Explain why this is secure (and link to ...
6 years, 1 month ago (2014-11-19 17:36:55 UTC) #16
robwu
A revert of this CL (patchset #3 id:80001) has been created in https://codereview.chromium.org/739133003/ by rob@robwu.nl. ...
6 years, 1 month ago (2014-11-19 17:38:20 UTC) #17
not at google - send to devlin
On 2014/11/19 17:31:27, robwu wrote: > On 2014/11/19 17:27:29, kalman wrote: > > Wuh, how ...
6 years, 1 month ago (2014-11-19 17:39:58 UTC) #18
not at google - send to devlin
If you change me from TBR= to R= then lgtm on this patch.
6 years, 1 month ago (2014-11-19 17:40:37 UTC) #19
not at google - send to devlin
On 2014/11/19 17:40:37, kalman wrote: > If you change me from TBR= to R= then ...
6 years, 1 month ago (2014-11-19 17:40:49 UTC) #20
robwu
Added extra comments. Thanks for educating me one the right use of TBR.
6 years, 1 month ago (2014-11-19 18:04:34 UTC) #21
robwu
Ben, does the new comments in PS 4 lg to you?
6 years, 1 month ago (2014-11-19 22:01:07 UTC) #22
not at google - send to devlin
lgtm
6 years, 1 month ago (2014-11-19 22:03:05 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/722233004/100001
6 years, 1 month ago (2014-11-19 22:05:31 UTC) #25
commit-bot: I haz the power
Committed patchset #4 (id:100001)
6 years, 1 month ago (2014-11-19 23:34:11 UTC) #26
commit-bot: I haz the power
6 years, 1 month ago (2014-11-19 23:34:43 UTC) #27
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/087183913f74ebd1e18964fabd269dfebb4763f3
Cr-Commit-Position: refs/heads/master@{#304922}

Powered by Google App Engine
This is Rietveld 408576698