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

Issue 1869063003: Check all CSPs rather than exiting early if a resource is blocked (Closed)

Created:
4 years, 8 months ago by estark
Modified:
4 years, 7 months ago
Reviewers:
Mike West
CC:
blink-reviews, chromium-reviews, mkwst+watchlist-csp_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Check all CSPs rather than exiting early if a resource is blocked Previously, if a single policy blocked a resource load, we would exit early and not check the load against any other policies that might be in effect. Checking other policies, however, might have side effects (like sending reports) that should execute even if the load has already been blocked. BUG=503730 Committed: https://crrev.com/c9aac646c5b7be2c1dc2c0db0ac79fcedbaceee9 Cr-Commit-Position: refs/heads/master@{#392398}

Patch Set 1 #

Patch Set 2 : remove debug code #

Total comments: 4

Patch Set 3 : rebase #

Patch Set 4 : mkwst comments; add moar tests #

Patch Set 5 : fix multiple-report-policies test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -40 lines) Patch
A third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/multiple-enforce-policies.php View 1 2 3 1 chunk +15 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/multiple-enforce-policies-expected.txt View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/multiple-report-policies.php View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/multiple-report-policies-expected.txt View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-multiple.php View 1 chunk +14 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-multiple-expected.txt View 1 chunk +11 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-multiple-reversed.php View 1 2 3 1 chunk +14 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-multiple-reversed-expected.txt View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp View 1 2 3 2 chunks +32 lines, -40 lines 0 comments Download

Messages

Total messages: 13 (3 generated)
Mike West
Two nits that apply throughout, and I'd like to see a few more tests (multiple ...
4 years, 8 months ago (2016-04-07 22:32:33 UTC) #2
Mike West
(Ping?)
4 years, 7 months ago (2016-04-26 08:14:44 UTC) #3
estark
On 2016/04/26 08:14:44, Mike West (slow until 25th) wrote: > (Ping?) Sorry, I haven't forgotten ...
4 years, 7 months ago (2016-04-26 17:10:11 UTC) #4
estark
On 2016/04/26 17:10:11, estark wrote: > On 2016/04/26 08:14:44, Mike West (slow until 25th) wrote: ...
4 years, 7 months ago (2016-05-09 18:35:39 UTC) #5
estark
https://codereview.chromium.org/1869063003/diff/20001/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp File third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp (right): https://codereview.chromium.org/1869063003/diff/20001/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp#newcode330 third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp:330: isAllowed = (policy.get()->*allowed)(reportingStatus) && isAllowed; On 2016/04/07 22:32:33, Mike ...
4 years, 7 months ago (2016-05-09 18:35:59 UTC) #6
Mike West
Still LGTM. That said, would you mind filing a bug about the multiple console warnings? ...
4 years, 7 months ago (2016-05-09 18:52:21 UTC) #7
estark
On 2016/05/09 18:52:21, Mike West wrote: > Still LGTM. > > That said, would you ...
4 years, 7 months ago (2016-05-09 19:01:43 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1869063003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1869063003/80001
4 years, 7 months ago (2016-05-09 19:02:07 UTC) #10
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 7 months ago (2016-05-09 19:38:22 UTC) #11
commit-bot: I haz the power
4 years, 7 months ago (2016-05-09 19:40:30 UTC) #13
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/c9aac646c5b7be2c1dc2c0db0ac79fcedbaceee9
Cr-Commit-Position: refs/heads/master@{#392398}

Powered by Google App Engine
This is Rietveld 408576698