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

Issue 570563003: Implement CSP check for manifest fetching (Closed)

Created:
6 years, 3 months ago by kenneth.r.christiansen
Modified:
6 years, 2 months ago
CC:
blink-reviews, gavinp+loader_chromium.org, Nate Chapin
Project:
blink
Visibility:
Public.

Description

Implement CSP check for manifest fetching The CSP bits include the 'manifest-src' directive, but _not_ the forthcoming "manifest that sets a CSP for its documents" feature. BUG=366145 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183317

Patch Set 1 #

Total comments: 3

Patch Set 2 : Fixed comments and added tests #

Total comments: 1

Patch Set 3 : With more tests #

Patch Set 4 : Fixed wrongly uploaded test result #

Patch Set 5 : Rebased #

Total comments: 5

Patch Set 6 : Fixed nits #

Patch Set 7 : Rebased, yet again #

Patch Set 8 : Make sure the load completes when CSP policy blocks #

Patch Set 9 : Rebased #

Patch Set 10 : Rebase corrected #

Total comments: 1

Patch Set 11 : Fixed test case #

Patch Set 12 : #

Patch Set 13 : Fixed nit from mkwst #

Unified diffs Side-by-side diffs Delta from patch set Stats (+189 lines, -2 lines) Patch
A LayoutTests/http/tests/security/contentSecurityPolicy/directive-parsing-manifest.html View 1 2 1 chunk +17 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/contentSecurityPolicy/directive-parsing-manifest-expected.txt View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/contentSecurityPolicy/manifest-src-allowed.html View 1 2 3 4 5 1 chunk +12 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/contentSecurityPolicy/manifest-src-allowed-expected.txt View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/contentSecurityPolicy/manifest-src-blocked.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +12 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/contentSecurityPolicy/manifest-src-blocked-expected.txt View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/contentSecurityPolicy/manifest.test/manifest.json View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/fetch/ResourceFetcher.cpp View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download
M Source/core/frame/csp/CSPDirectiveList.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/frame/csp/CSPDirectiveList.cpp View 1 2 3 4 5 6 7 8 9 4 chunks +15 lines, -0 lines 0 comments Download
M Source/core/frame/csp/ContentSecurityPolicy.h View 1 2 3 4 5 6 3 chunks +7 lines, -1 line 0 comments Download
M Source/core/frame/csp/ContentSecurityPolicy.cpp View 1 2 3 4 5 6 7 8 3 chunks +10 lines, -0 lines 0 comments Download
M Source/core/testing/URLTestHelpers.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/testing/URLTestHelpers.cpp View 1 1 chunk +5 lines, -0 lines 0 comments Download
M Source/web/AssociatedURLLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -1 line 0 comments Download
M Source/web/tests/WebFrameTest.cpp View 1 2 3 4 5 6 7 8 5 chunks +80 lines, -0 lines 0 comments Download
A Source/web/tests/data/link-manifest-fetch.json View 1 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 39 (4 generated)
mlamouri (slow - plz ping)
So, that will use the CSP rules of the WebLocalFrame's document passed to AssociatedURLLoader, right?
6 years, 3 months ago (2014-09-15 15:48:20 UTC) #2
mlamouri (slow - plz ping)
https://codereview.chromium.org/570563003/diff/1/Source/web/AssociatedURLLoader.cpp File Source/web/AssociatedURLLoader.cpp (right): https://codereview.chromium.org/570563003/diff/1/Source/web/AssociatedURLLoader.cpp#newcode325 Source/web/AssociatedURLLoader.cpp:325: nit: empty line edit.
6 years, 3 months ago (2014-09-15 15:48:45 UTC) #4
Mike West
On 2014/09/15 15:48:45, Mounir Lamouri wrote: > https://codereview.chromium.org/570563003/diff/1/Source/web/AssociatedURLLoader.cpp > File Source/web/AssociatedURLLoader.cpp (right): > > https://codereview.chromium.org/570563003/diff/1/Source/web/AssociatedURLLoader.cpp#newcode325 ...
6 years, 3 months ago (2014-09-16 09:52:10 UTC) #5
kenneth.christiansen
On 2014/09/16 at 09:52:10, mkwst wrote: > On 2014/09/15 15:48:45, Mounir Lamouri wrote: > > ...
6 years, 3 months ago (2014-09-16 11:15:25 UTC) #6
Mike West
This looks pretty reasonable, just two comments. Once the prerequisite patches land, please do add ...
6 years, 3 months ago (2014-09-16 11:46:20 UTC) #7
kenneth.christiansen
On 2014/09/16 at 11:46:20, mkwst wrote: > This looks pretty reasonable, just two comments. > ...
6 years, 3 months ago (2014-09-16 12:00:38 UTC) #8
mlamouri (slow - plz ping)
On 2014/09/16 12:00:38, kenneth.christiansen wrote: > On 2014/09/16 at 11:46:20, mkwst wrote: > > This ...
6 years, 3 months ago (2014-09-16 12:49:06 UTC) #9
kenneth.christiansen
> Wouldn't that make more sense to test this in Blink given that it is ...
6 years, 3 months ago (2014-09-17 13:39:16 UTC) #10
kenneth.christiansen
On 2014/09/17 at 13:39:16, kenneth.christiansen wrote: > > Wouldn't that make more sense to test ...
6 years, 3 months ago (2014-09-17 14:05:51 UTC) #11
Mike West
On 2014/09/17 14:05:51, kenneth.christiansen wrote: > On 2014/09/17 at 13:39:16, kenneth.christiansen wrote: > > > ...
6 years, 3 months ago (2014-09-17 14:48:24 UTC) #12
mlamouri (slow - plz ping)
Pretty great to see that happening. We might end up with a quite advanced manifest ...
6 years, 3 months ago (2014-09-17 20:07:52 UTC) #13
kenneth.christiansen
On 2014/09/17 at 20:07:52, mlamouri wrote: > Pretty great to see that happening. We might ...
6 years, 3 months ago (2014-09-18 07:46:21 UTC) #14
Mike West
On 2014/09/18 07:46:21, kenneth.christiansen wrote: > On 2014/09/17 at 20:07:52, mlamouri wrote: > > Pretty ...
6 years, 3 months ago (2014-09-18 07:49:23 UTC) #15
mlamouri (slow - plz ping)
On 2014/09/18 07:49:23, Mike West (OOO until 24th) wrote: > Alternatively, if this is the ...
6 years, 3 months ago (2014-09-18 13:35:21 UTC) #16
Mike West
On 2014/09/18 13:35:21, Mounir Lamouri wrote: > On 2014/09/18 07:49:23, Mike West (OOO until 24th) ...
6 years, 3 months ago (2014-09-18 13:41:31 UTC) #17
kenneth.christiansen
OK added the layout tests as requested. This, though, depends on https://codereview.chromium.org/584553002 which doesn't pass ...
6 years, 3 months ago (2014-09-18 13:58:24 UTC) #18
kenneth.christiansen
New patch up for review, depends on https://codereview.chromium.org/584553002
6 years, 3 months ago (2014-09-18 16:06:58 UTC) #19
Mike West
Looks good, but the patch fails to apply, and I'd like you to add a ...
6 years, 2 months ago (2014-09-29 11:00:47 UTC) #20
kenneth.christiansen
Fixed the nits. > https://codereview.chromium.org/570563003/diff/80001/Source/web/tests/WebFrameTest.cpp#newcode135 > Source/web/tests/WebFrameTest.cpp:135: , m_notBaseURL("http://www.nottest.com/") > Nit: These shouldn't be real ...
6 years, 2 months ago (2014-09-29 13:36:00 UTC) #21
Mike West
win_blink_rel is crashing on the new tests you added. I've thrown the patch to win_blink_dbg ...
6 years, 2 months ago (2014-09-29 18:17:20 UTC) #22
mlamouri (slow - plz ping)
On 2014/09/29 18:17:20, Mike West wrote: > win_blink_rel is crashing on the new tests you ...
6 years, 2 months ago (2014-09-29 23:37:40 UTC) #23
kenneth.christiansen
On 2014/09/29 at 23:37:40, mlamouri wrote: > On 2014/09/29 18:17:20, Mike West wrote: > > ...
6 years, 2 months ago (2014-09-30 06:09:10 UTC) #24
kenneth.christiansen
On 2014/09/30 at 06:09:10, kenneth.christiansen wrote: > On 2014/09/29 at 23:37:40, mlamouri wrote: > > ...
6 years, 2 months ago (2014-09-30 06:13:41 UTC) #25
kenneth.christiansen
FYI: I got access to the link using my other account and VPN, looking at ...
6 years, 2 months ago (2014-09-30 09:01:23 UTC) #26
Mike West
https://codereview.chromium.org/570563003/diff/180001/LayoutTests/http/tests/security/contentSecurityPolicy/manifest-src-blocked.html File LayoutTests/http/tests/security/contentSecurityPolicy/manifest-src-blocked.html (right): https://codereview.chromium.org/570563003/diff/180001/LayoutTests/http/tests/security/contentSecurityPolicy/manifest-src-blocked.html#newcode1 LayoutTests/http/tests/security/contentSecurityPolicy/manifest-src-blocked.html:1: <meta http-equiv="Content-Security-Policy" content="manifest-src *"> This should probably be "manifest-src ...
6 years, 2 months ago (2014-10-06 10:03:59 UTC) #27
Mike West
LGTM otherwise, thanks for going a few rounds on this.
6 years, 2 months ago (2014-10-06 10:04:39 UTC) #28
kenneth.r.christiansen
This latest patch changes now the failure (CSP blocking) is propagated to the ManifestFetcher so ...
6 years, 2 months ago (2014-10-06 14:40:32 UTC) #30
Mike West
On 2014/10/06 14:40:32, kenneth.r.christiansen wrote: > The earlier patch following the sync path in DocumentThreadableLoader ...
6 years, 2 months ago (2014-10-06 14:49:11 UTC) #31
kenneth.r.christiansen
On 2014/10/06 at 14:49:11, mkwst wrote: > On 2014/10/06 14:40:32, kenneth.r.christiansen wrote: > > The ...
6 years, 2 months ago (2014-10-06 14:53:00 UTC) #32
Mike West
On 2014/10/06 14:53:00, kenneth.r.christiansen wrote: > > This seems like a reasonable hardening of the ...
6 years, 2 months ago (2014-10-06 15:06:12 UTC) #33
kenneth.r.christiansen
On 2014/10/06 at 15:06:12, mkwst wrote: > On 2014/10/06 14:53:00, kenneth.r.christiansen wrote: > > > ...
6 years, 2 months ago (2014-10-06 15:18:02 UTC) #34
Mike West
On 2014/10/06 15:18:02, kenneth.r.christiansen wrote: > On 2014/10/06 at 15:06:12, mkwst wrote: > > On ...
6 years, 2 months ago (2014-10-06 15:38:49 UTC) #35
Mike West
On 2014/10/06 15:38:49, Mike West wrote: > On 2014/10/06 15:18:02, kenneth.r.christiansen wrote: > > On ...
6 years, 2 months ago (2014-10-06 15:39:30 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/570563003/220001
6 years, 2 months ago (2014-10-07 08:38:03 UTC) #38
commit-bot: I haz the power
6 years, 2 months ago (2014-10-07 08:42:57 UTC) #39
Message was sent while issue was closed.
Committed patchset #13 (id:220001) as 183317

Powered by Google App Engine
This is Rietveld 408576698