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

Issue 2619783002: CSP: Strip the fragment from reported URLs. (Closed)

Created:
3 years, 11 months ago by Mike West
Modified:
3 years, 9 months ago
Reviewers:
Yoav Weiss, elawrence
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

CSP: Strip the fragment from reported URLs. We should have been stripping the fragment from the URL we report for CSP violations, but we weren't. Now we are, by running the URLs through `stripURLForUseInReport()`, which implements the stripping algorithm from CSP2: https://www.w3.org/TR/CSP2/#strip-uri-for-reporting Eventually, we will migrate more completely to the CSP3 world that doesn't require such detailed stripping, as it exposes less data to the reports, but we're not there yet. BUG=678776 Review-Url: https://codereview.chromium.org/2619783002 Cr-Commit-Position: refs/heads/master@{#458045} Committed: https://chromium.googlesource.com/chromium/src/+/fea16c8b60ff3d0756d5eb392394963b647bc41a

Patch Set 1 #

Total comments: 6

Patch Set 2 : Rebase #

Patch Set 3 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -3 lines) Patch
A third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-strips-fragment.html View 1 1 chunk +20 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp View 1 2 2 chunks +12 lines, -3 lines 0 comments Download

Messages

Total messages: 30 (18 generated)
Mike West
Eric, mind taking a look at this? (Should I have let you upload a fix? ...
3 years, 11 months ago (2017-01-09 12:34:15 UTC) #4
elawrence
On 2017/01/09 12:34:15, Mike West (sloooooow) wrote: > Eric, mind taking a look at this? ...
3 years, 11 months ago (2017-01-09 16:34:17 UTC) #7
elawrence
https://codereview.chromium.org/2619783002/diff/1/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp File third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp (right): https://codereview.chromium.org/2619783002/diff/1/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp#newcode1029 third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp:1029: init.setDocumentURI(blockedURL.strippedForUseAsReferrer()); In the stripURLForUseInReport() function immediately prior, we note ...
3 years, 11 months ago (2017-01-09 16:34:42 UTC) #8
Mike West
I lost track of this, sorry. Mind taking another look, Eric? https://codereview.chromium.org/2619783002/diff/1/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp File third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp (right): ...
3 years, 10 months ago (2017-02-23 08:41:19 UTC) #9
elawrence
Thanks for the updates-- the code changes look good and I'm happy to have a ...
3 years, 10 months ago (2017-02-24 02:00:41 UTC) #14
elawrence
Hey, Mike-- Are you still thinking about this one? We had another bug filed against ...
3 years, 9 months ago (2017-03-13 19:28:00 UTC) #15
Mike West
On 2017/03/13 at 19:28:00, elawrence wrote: > Hey, Mike-- Are you still thinking about this ...
3 years, 9 months ago (2017-03-17 13:20:40 UTC) #16
Mike West
Yoav, would you mind stamping this?
3 years, 9 months ago (2017-03-20 08:51:11 UTC) #22
Yoav Weiss
On 2017/03/20 08:51:11, Mike West (Slow.) wrote: > Yoav, would you mind stamping this? LGTM ...
3 years, 9 months ago (2017-03-20 09:17:57 UTC) #23
Mike West
Done, thanks! In the happy future, we won't need `stripURLForUseInReport()`, as we won't be leaking ...
3 years, 9 months ago (2017-03-20 11:06:30 UTC) #25
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/2619783002/40001
3 years, 9 months ago (2017-03-20 11:06:42 UTC) #27
commit-bot: I haz the power
3 years, 9 months ago (2017-03-20 12:43:16 UTC) #30
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/fea16c8b60ff3d0756d5eb392394...

Powered by Google App Engine
This is Rietveld 408576698