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

Issue 1010893003: Upgrade insecure requests: Pipe navigational hosts down into nested documents. (Closed)

Created:
5 years, 9 months ago by Mike West
Modified:
5 years, 9 months ago
Reviewers:
Yoav Weiss
CC:
blink-reviews, blink-reviews-dom_chromium.org, dglazkov+blink, eae+blinkwatch, gavinp+loader_chromium.org, Nate Chapin, mkwst+watchlist-csp_chromium.org, rwlbuis, sof, tyoshino+watch_chromium.org
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Upgrade insecure requests: Pipe navigational hosts down into nested documents. After [1], we need to track hosts (including ancestor hosts) that have set the 'upgrade-insecure-requests' directive in their respective policies in order to correctly upgrade navigational requests to one of those hosts. This patch adds a 'HashSet<unsigned>' to SecurityContext that holds the hashes of the hosts which have opted-into such treatment, ensures that the set is correctly populated when creating a Document or applying a policy, and uses the set to make decisions about navigational upgrades inside ResourceFetcher. [1]: https://github.com/w3c/webappsec/commit/f947b75e9b906c53d0bd6e66ca59b60bfe0aa20e ----------------------------------------------------------------------- This relands https://src.chromium.org/viewvc/blink?view=rev&revision=191421 which was reverted to fix crashes tracked in https://crbug.com/465497. These crashes turned out to be a different patch's fault, but I've added a few null checks anyway, as Yoav correctly noted that they were missing. ----------------------------------------------------------------------- BUG=455674 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=192082

Patch Set 1 #

Patch Set 2 : Rebase. #

Total comments: 6

Patch Set 3 : Feedback. #

Total comments: 1

Patch Set 4 : MOARASSERT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -10 lines) Patch
M Source/core/dom/Document.cpp View 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/dom/DocumentInit.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/DocumentInit.cpp View 1 chunk +6 lines, -0 lines 0 comments Download
M Source/core/dom/SecurityContext.h View 1 4 chunks +8 lines, -0 lines 0 comments Download
M Source/core/frame/csp/ContentSecurityPolicy.cpp View 1 2 2 chunks +5 lines, -1 line 0 comments Download
M Source/core/frame/csp/ContentSecurityPolicyTest.cpp View 4 chunks +4 lines, -0 lines 0 comments Download
M Source/core/loader/FrameFetchContext.cpp View 1 2 1 chunk +7 lines, -5 lines 0 comments Download
M Source/core/loader/FrameFetchContextTest.cpp View 1 2 2 chunks +3 lines, -4 lines 0 comments Download
M Source/core/loader/FrameLoader.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/loader/FrameLoader.cpp View 1 2 3 2 chunks +18 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
Mike West
One more, Yoav. You reviewed this before it was reverted; now it's back with extra ...
5 years, 9 months ago (2015-03-17 13:18:09 UTC) #2
Yoav Weiss
A few extra null checks/ASSERTs? https://codereview.chromium.org/1010893003/diff/20001/Source/core/frame/csp/ContentSecurityPolicy.cpp File Source/core/frame/csp/ContentSecurityPolicy.cpp (right): https://codereview.chromium.org/1010893003/diff/20001/Source/core/frame/csp/ContentSecurityPolicy.cpp#newcode182 Source/core/frame/csp/ContentSecurityPolicy.cpp:182: } Are we sure ...
5 years, 9 months ago (2015-03-17 15:17:28 UTC) #3
Mike West
Mind taking another look? https://codereview.chromium.org/1010893003/diff/20001/Source/core/frame/csp/ContentSecurityPolicy.cpp File Source/core/frame/csp/ContentSecurityPolicy.cpp (right): https://codereview.chromium.org/1010893003/diff/20001/Source/core/frame/csp/ContentSecurityPolicy.cpp#newcode182 Source/core/frame/csp/ContentSecurityPolicy.cpp:182: } On 2015/03/17 at 15:17:27, ...
5 years, 9 months ago (2015-03-18 09:31:53 UTC) #4
Yoav Weiss
LGTM % 1 more assert https://codereview.chromium.org/1010893003/diff/40001/Source/core/loader/FrameLoader.cpp File Source/core/loader/FrameLoader.cpp (right): https://codereview.chromium.org/1010893003/diff/40001/Source/core/loader/FrameLoader.cpp#newcode1436 Source/core/loader/FrameLoader.cpp:1436: return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade(); Yeah, obviously ...
5 years, 9 months ago (2015-03-18 09:48:35 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1010893003/60001
5 years, 9 months ago (2015-03-18 10:32:24 UTC) #8
commit-bot: I haz the power
5 years, 9 months ago (2015-03-18 12:23:45 UTC) #9
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=192082

Powered by Google App Engine
This is Rietveld 408576698