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

Issue 999473002: Revert of 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

Revert of Upgrade insecure requests: Pipe navigational hosts down into nested documents. (patchset #1 id:1 of https://codereview.chromium.org/978323002/) Reason for revert: Speculative revert to see if things stop crashing. :) BUG=465497 Original issue's 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]: ttps://github.com/w3c/webappsec/commit/f947b75e9b906c53d0bd6e66ca59b60bfe0aa20e > > BUG=455674 > > Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=191421 TBR=yoav@yoav.ws NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=455674 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=191650

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -52 lines) Patch
M Source/core/dom/Document.cpp View 1 chunk +0 lines, -4 lines 0 comments Download
M Source/core/dom/DocumentInit.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/dom/DocumentInit.cpp View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/dom/SecurityContext.h View 4 chunks +0 lines, -9 lines 1 comment Download
M Source/core/fetch/ResourceFetcher.cpp View 1 chunk +6 lines, -7 lines 2 comments Download
M Source/core/fetch/ResourceFetcherTest.cpp View 2 chunks +4 lines, -3 lines 0 comments Download
M Source/core/frame/csp/ContentSecurityPolicy.cpp View 1 chunk +1 line, -3 lines 0 comments Download
M Source/core/frame/csp/ContentSecurityPolicyTest.cpp View 4 chunks +0 lines, -4 lines 0 comments Download
M Source/core/loader/FrameLoader.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/loader/FrameLoader.cpp View 1 chunk +0 lines, -14 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Mike West
Created Revert of Upgrade insecure requests: Pipe navigational hosts down into nested documents.
5 years, 9 months ago (2015-03-10 18:55:29 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/999473002/1
5 years, 9 months ago (2015-03-10 18:55:49 UTC) #2
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://src.chromium.org/viewvc/blink?view=rev&revision=191650
5 years, 9 months ago (2015-03-10 18:56:31 UTC) #3
Yoav Weiss
5 years, 9 months ago (2015-03-10 19:03:06 UTC) #4
Message was sent while issue was closed.
Hmm, seems like we've let a lot of unchecked possibly nullptrs slip by :/

LGTM to revert

https://codereview.chromium.org/999473002/diff/1/Source/core/dom/SecurityCont...
File Source/core/dom/SecurityContext.h (left):

https://codereview.chromium.org/999473002/diff/1/Source/core/dom/SecurityCont...
Source/core/dom/SecurityContext.h:74: void addInsecureNavigationUpgrade(const
String& host) { m_insecureNavigationsToUpgrade.add(host.impl()->hash()); }
here we trusted host.impl() to be non-null. Are we sure that's the case? If so,
worth ASSERTing once this goes back in

https://codereview.chromium.org/999473002/diff/1/Source/core/fetch/ResourceFe...
File Source/core/fetch/ResourceFetcher.cpp (left):

https://codereview.chromium.org/999473002/diff/1/Source/core/fetch/ResourceFe...
Source/core/fetch/ResourceFetcher.cpp:899: ||
document()->insecureNavigationsToUpgrade()->contains(url.host().impl()->hash()))
Again, here we relied on the existence of
document()->insecureNavigationsToUpgrade() and impl(). Worth to check for it or
assert once this goes back in.

https://codereview.chromium.org/999473002/diff/1/Source/core/fetch/ResourceFe...
File Source/core/fetch/ResourceFetcher.cpp (right):

https://codereview.chromium.org/999473002/diff/1/Source/core/fetch/ResourceFe...
Source/core/fetch/ResourceFetcher.cpp:898: || url.host() ==
document()->securityOrigin()->host())
Should we assert for document()->securityOrigin() ?

Powered by Google App Engine
This is Rietveld 408576698