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

Issue 2456013002: CSP: 'connect-src' should not cause exceptions. (Closed)

Created:
4 years, 1 month ago by Mike West
Modified:
3 years, 9 months ago
CC:
blink-reviews, chromium-reviews, haraken, tyoshino+watch_chromium.org, yhirano+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

CSP: 'connect-src' should not cause exceptions. We changed the spec quite some time ago to deal with 'connect-src' violations in Fetch rather than in each API individually. This means that we should stop throwing exceptions in 'XHR::open', 'EventSource', 'WebSocket', and 'sendBeacon'. Closes w3c/webappsec-csp#120. BUG=651879, 694525 R=tyoshino@chromium.org,foolip@chromium.org Review-Url: https://codereview.chromium.org/2456013002 Cr-Commit-Position: refs/heads/master@{#458384} Committed: https://chromium.googlesource.com/chromium/src/+/8a4e051abc8f7a36687b5f45a214e9489b6a66b7

Patch Set 1 #

Total comments: 14

Patch Set 2 : foolip@ #

Patch Set 3 : Rebase + WPT. #

Patch Set 4 : Rebase. #

Patch Set 5 : One more test. #

Patch Set 6 : Ugh. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+235 lines, -366 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/content-security-policy/connect-src/connect-src-beacon-blocked.sub.html View 1 2 1 chunk +16 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/content-security-policy/connect-src/connect-src-eventsource-blocked.sub.html View 1 2 1 chunk +61 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/content-security-policy/connect-src/connect-src-websocket-blocked.sub.html View 1 2 1 chunk +34 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/content-security-policy/connect-src/connect-src-xmlhttprequest-blocked.sub.html View 1 2 1 chunk +69 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/content-security-policy/inside-worker/dedicated-inheritance.html View 1 2 3 2 chunks +4 lines, -1 line 1 comment Download
M third_party/WebKit/LayoutTests/external/wpt/content-security-policy/inside-worker/support/connect-src-allow.sub.js View 1 2 3 2 chunks +6 lines, -12 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/content-security-policy/inside-worker/support/connect-src-self.sub.js View 1 2 3 2 chunks +12 lines, -17 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/content-security-policy/support/testharness-helper.js View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/eventsource/eventsource-constructor.html View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/eventsource/eventsource-constructor-expected.txt View 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/xmlhttprequest/xmlhttprequest-open-exceptions.html View 1 2 3 4 1 chunk +0 lines, -9 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/xmlhttprequest/xmlhttprequest-open-exceptions-expected.txt View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-beacon-blocked.html View 1 2 1 chunk +0 lines, -26 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-beacon-blocked-expected.txt View 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-eventsource-blocked.html View 1 2 1 chunk +0 lines, -27 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-eventsource-blocked-expected.txt View 1 chunk +0 lines, -4 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-eventsource-redirect-to-blocked.html View 1 chunk +0 lines, -32 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-eventsource-redirect-to-blocked-expected.txt View 1 chunk +0 lines, -7 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-websocket-blocked.html View 1 2 1 chunk +0 lines, -27 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-websocket-blocked-expected.txt View 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-xmlhttprequest-blocked.html View 1 2 1 chunk +0 lines, -28 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-xmlhttprequest-blocked-expected.txt View 1 chunk +0 lines, -4 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-xmlhttprequest-redirect-to-blocked.html View 1 chunk +0 lines, -37 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-xmlhttprequest-redirect-to-blocked-expected.txt View 1 chunk +0 lines, -7 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/shared-worker-connect-src-allowed.html View 1 2 3 1 chunk +0 lines, -29 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/shared-worker-connect-src-allowed-expected.txt View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/shared-worker-connect-src-blocked.html View 1 2 3 1 chunk +0 lines, -29 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/shared-worker-connect-src-blocked-expected.txt View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/source-list-parsing-malformed-meta.html View 1 2 3 2 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/source-list-parsing-malformed-meta-expected.txt View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/PingLoader.cpp View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp View 1 2 3 1 chunk +0 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/modules/beacon/NavigatorBeacon.cpp View 1 2 2 chunks +0 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/modules/eventsource/EventSource.cpp View 1 2 2 chunks +5 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp View 1 2 1 chunk +7 lines, -7 lines 0 comments Download

Messages

Total messages: 37 (23 generated)
Mike West
foolip@: Can you take a look at the (completely rewritten) tests? tyoshino@: Can you look ...
4 years, 1 month ago (2016-10-27 13:43:17 UTC) #3
foolip
tests lgtm % nits, but I looked less carefully when the structure looked similar to ...
4 years, 1 month ago (2016-10-27 13:59:51 UTC) #4
tyoshino (SeeGerritForStatus)
lgtm https://codereview.chromium.org/2456013002/diff/1/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp File third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp (left): https://codereview.chromium.org/2456013002/diff/1/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp#oldcode335 third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp:335: // once webkit.org/b/104520 is solved. is it fine ...
4 years, 1 month ago (2016-10-27 14:16:35 UTC) #5
Mike West
Thanks, foolip! https://codereview.chromium.org/2456013002/diff/1/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-beacon-blocked.html File third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-beacon-blocked.html (right): https://codereview.chromium.org/2456013002/diff/1/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-beacon-blocked.html#newcode11 third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-beacon-blocked.html:11: return; On 2016/10/27 at 13:59:50, foolip wrote: ...
4 years, 1 month ago (2016-10-27 14:18:24 UTC) #6
Mike West
Thanks, tyoshino! https://codereview.chromium.org/2456013002/diff/1/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp File third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp (left): https://codereview.chromium.org/2456013002/diff/1/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp#oldcode335 third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp:335: // once webkit.org/b/104520 is solved. On 2016/10/27 ...
4 years, 1 month ago (2016-10-27 14:20:25 UTC) #7
tyoshino (SeeGerritForStatus)
lgtm https://codereview.chromium.org/2456013002/diff/1/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp File third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp (left): https://codereview.chromium.org/2456013002/diff/1/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp#oldcode335 third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp:335: // once webkit.org/b/104520 is solved. On 2016/10/27 14:20:25, ...
4 years, 1 month ago (2016-10-27 14:22:13 UTC) #8
Mike West
Looks like I missed some existing tests. I'll fix them up tomorrow to not rely ...
4 years, 1 month ago (2016-10-27 15:56:59 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2456013002/60001
3 years, 9 months ago (2017-03-21 09:32:42 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2456013002/80001
3 years, 9 months ago (2017-03-21 09:36:02 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/404633)
3 years, 9 months ago (2017-03-21 11:29:31 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2456013002/100001
3 years, 9 months ago (2017-03-21 11:34:55 UTC) #31
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://chromium.googlesource.com/chromium/src/+/8a4e051abc8f7a36687b5f45a214e9489b6a66b7
3 years, 9 months ago (2017-03-21 12:58:56 UTC) #34
jeffcarp
https://codereview.chromium.org/2456013002/diff/100001/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/inside-worker/dedicated-inheritance.html File third_party/WebKit/LayoutTests/external/wpt/content-security-policy/inside-worker/dedicated-inheritance.html (right): https://codereview.chromium.org/2456013002/diff/100001/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/inside-worker/dedicated-inheritance.html#newcode17 third_party/WebKit/LayoutTests/external/wpt/content-security-policy/inside-worker/dedicated-inheritance.html:17: /* Was this left over for debugging? This is ...
3 years, 9 months ago (2017-03-22 18:25:11 UTC) #36
jeffcarp
3 years, 9 months ago (2017-03-22 21:07:46 UTC) #37
Message was sent while issue was closed.
On 2017/03/22 at 18:25:11, jeffcarp wrote:
>
https://codereview.chromium.org/2456013002/diff/100001/third_party/WebKit/Lay...
> File
third_party/WebKit/LayoutTests/external/wpt/content-security-policy/inside-worker/dedicated-inheritance.html
(right):
> 
>
https://codereview.chromium.org/2456013002/diff/100001/third_party/WebKit/Lay...
>
third_party/WebKit/LayoutTests/external/wpt/content-security-policy/inside-worker/dedicated-inheritance.html:17:
/*
> Was this left over for debugging? This is what's conflicting and keeping the
CL from being exported.

This CL wasn't being exported since it didn't apply cleanly onto WPT
origin/master. I created a manual export PR here:
https://github.com/w3c/web-platform-tests/pull/5205

Powered by Google App Engine
This is Rietveld 408576698