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

Issue 2345463002: Fix PingLoader to omit credentials for cross-origin violation reports (Closed)

Created:
4 years, 3 months ago by tyoshino (SeeGerritForStatus)
Modified:
4 years, 2 months ago
Reviewers:
Mike West
CC:
blink-reviews, chromium-reviews, gavinp+loader_chromium.org, Nate Chapin, loading-reviews_chromium.org, tyoshino+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix PingLoader to omit credentials for cross-origin violation reports My patch http://crrev.com/b3b697fc8bcc938e8b9ab32a34fc5933494faaa1 broke the PingLoader code path for CSP violation reporting by always passing AllowStoredCredentials by mistake. The test report-cross-origin-no-cookies.html (now named .php) introduced by http://crrev.com/a161a28377d8d71b63a02066574fb47f03dd4b3b included a sync XHR to set a cookie for the remote host, but it has been not working because: - its withCredentials is not set to true - testRunner is not configured to accept third party cookies - setCookies.cgi emits wildcard Access-Control-Allow-Origin which is invalid for credentialled CORS requests - it has non-CORS-safelisted header SET-COOKIE So, the test didn't catch this breakage. This CL fixes it by using a no-cors fetch() to /security/resources/set-cookie.php which takes arguments via the query part of a URL. BUG=646780 R=mkwst@chromium.org Committed: https://crrev.com/19cf9d97e48c9fe6974d61437549202745b20077 Cr-Commit-Position: refs/heads/master@{#422787}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Addressed #5 #

Patch Set 3 : a #

Patch Set 4 : Rebase #

Patch Set 5 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -14 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies.php View 1 2 1 chunk +19 lines, -9 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-expected.txt View 1 2 chunks +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/loader/PingLoader.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 23 (16 generated)
tyoshino (SeeGerritForStatus)
Sorry, Mike. I made a mistake in http://crrev.com/b3b697fc8bcc938e8b9ab32a34fc5933494faaa1 Please take a look.
4 years, 3 months ago (2016-09-14 10:48:15 UTC) #4
Mike West
LGTM % test nit. https://codereview.chromium.org/2345463002/diff/1/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies.php File third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies.php (right): https://codereview.chromium.org/2345463002/diff/1/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies.php#newcode22 third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies.php:22: }); In hindsight, this is ...
4 years, 3 months ago (2016-09-14 12:54:06 UTC) #5
tyoshino (SeeGerritForStatus)
Thanks. I forgot to the upload updated expectation file. PTAL. https://codereview.chromium.org/2345463002/diff/1/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies.php File third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies.php (right): https://codereview.chromium.org/2345463002/diff/1/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies.php#newcode22 ...
4 years, 3 months ago (2016-09-14 14:41:23 UTC) #6
tyoshino (SeeGerritForStatus)
Hi Mike, could you take a quick look again? Thanks!
4 years, 3 months ago (2016-09-16 07:33:27 UTC) #7
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/2345463002/80001
4 years, 2 months ago (2016-10-04 13:22:15 UTC) #19
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 2 months ago (2016-10-04 14:36:52 UTC) #21
commit-bot: I haz the power
4 years, 2 months ago (2016-10-04 14:40:00 UTC) #23
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/19cf9d97e48c9fe6974d61437549202745b20077
Cr-Commit-Position: refs/heads/master@{#422787}

Powered by Google App Engine
This is Rietveld 408576698