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

Issue 1550723003: Adapt MixedContentChecker for remote frames (Closed)

Created:
4 years, 12 months ago by estark
Modified:
4 years, 11 months ago
CC:
blink-reviews, chromium-reviews, gavinp+loader_chromium.org, Nate Chapin, loading-reviews_chromium.org, site-isolation-reviews_chromium.org, tyoshino+watch_chromium.org, Yoav Weiss
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adapt MixedContentChecker for remote frames This CL adapts MixedContentChecker to do correct mixed content checks for content that is mixed with respect to a remote frame. There are a couple caveats/behavior changes: - When mixed content is detected, the message logged to the console is changed slightly: when the mixed frame is remote, it prints the origin instead of the full URL. - Subresources loaded with certificate errors are not yet correctly treated as mixed content when they are loaded in a remote HTTPS parent frame. - FrameLoaderClient methods, for the most part, go to the client for the frame that loaded the resource, which is not necessarily the "mixed frame". This is weird, but in practice, the implementations of these FrameLoaderClient methods do not care which frame they are actually called on. BUG=486936 Committed: https://crrev.com/56dc8e2191815bb5b64a5b81b5f1c4db7828b6ed Cr-Commit-Position: refs/heads/master@{#371534}

Patch Set 1 #

Patch Set 2 : rebase on https://codereview.chromium.org/1550233002/ #

Patch Set 3 : fix up layout tests #

Total comments: 28

Patch Set 4 : rebase on https://codereview.chromium.org/1583813003/ #

Patch Set 5 : rebase #

Patch Set 6 : alexmos comments #

Patch Set 7 : add some basic browser tests, fix a replication state bug that the test found #

Total comments: 21

Patch Set 8 : rebase #

Patch Set 9 : alexmos comments #

Total comments: 2

Patch Set 10 : rebase #

Total comments: 4

Patch Set 11 : add active mixed content tests + alexmos comments #

Patch Set 12 : move active mixed content test to site_per_process_browsertest.cc #

Patch Set 13 : minor cleanup #

Total comments: 4

Patch Set 14 : update layout tests for iframes that no longer have line numbers associated #

Patch Set 15 : fix test assertion #

Total comments: 9

Patch Set 16 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+290 lines, -76 lines) Patch
M chrome/browser/ssl/chrome_security_state_model_client_browser_tests.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +27 lines, -0 lines 0 comments Download
A chrome/test/data/ssl/page_runs_insecure_content_in_iframe_with_strict_blocking.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +10 lines, -0 lines 0 comments Download
M content/browser/site_per_process_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +114 lines, -0 lines 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -0 lines 0 comments Download
A + content/test/data/mixed-content/basic-active.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download
A content/test/data/mixed-content/basic-active-in-iframe.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +9 lines, -0 lines 0 comments Download
A content/test/data/mixed-content/basic-passive.html View 1 2 3 4 5 6 1 chunk +10 lines, -0 lines 0 comments Download
A content/test/data/mixed-content/basic-passive-in-iframe.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +9 lines, -0 lines 0 comments Download
A content/test/data/mixed-content/basic-passive-in-iframe-with-strict-blocking.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +9 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/mixedContent/active-subresource-in-iframe-blocked.https-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/mixedContent/insecure-css-image-with-reload-expected.txt View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/mixedContent/insecure-frame-in-data-iframe-in-main-frame-blocked-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/mixedContent/insecure-iframe-in-iframe-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/mixedContent/insecure-iframe-in-main-frame-allowed-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/mixedContent/insecure-iframe-in-main-frame-blocked-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/mixedContent/insecure-iframe-in-main-frame-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/mixedContent/insecure-script-in-data-iframe-in-main-frame-blocked-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/mixedContent/nonwebby-scheme-in-iframe-allowed.https-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/mixedContent/redirect-http-to-https-iframe-in-main-frame-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/mixedContent/redirect-https-to-http-iframe-in-main-frame-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/mixedContent/strict-mode-image-in-frame-blocked.https-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/DOMWindow.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameFetchContext.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/MixedContentChecker.h View 3 chunks +7 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/loader/MixedContentChecker.cpp View 1 2 3 4 5 6 7 8 14 chunks +78 lines, -52 lines 0 comments Download

Messages

Total messages: 34 (12 generated)
alexmos
A couple of preliminary comments, but the CL looks good overall. https://codereview.chromium.org/1550723003/diff/40001/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp File third_party/WebKit/Source/core/loader/MixedContentChecker.cpp (right): ...
4 years, 11 months ago (2016-01-11 22:02:24 UTC) #4
estark
Addressed Alex's comments and started adding some basic browser tests to site_per_process_browsertest.cc, though I'm not ...
4 years, 11 months ago (2016-01-14 23:05:49 UTC) #5
alexmos
[+site-isolation-reviews] https://codereview.chromium.org/1550723003/diff/40001/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp File third_party/WebKit/Source/core/loader/MixedContentChecker.cpp (right): https://codereview.chromium.org/1550723003/diff/40001/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp#newcode50 third_party/WebKit/Source/core/loader/MixedContentChecker.cpp:50: KURL mainResourceUrlForConsoleLog(Frame* frame) On 2016/01/14 23:05:48, estark wrote: ...
4 years, 11 months ago (2016-01-16 00:49:50 UTC) #6
estark
https://codereview.chromium.org/1550723003/diff/40001/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp File third_party/WebKit/Source/core/loader/MixedContentChecker.cpp (right): https://codereview.chromium.org/1550723003/diff/40001/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp#newcode50 third_party/WebKit/Source/core/loader/MixedContentChecker.cpp:50: KURL mainResourceUrlForConsoleLog(Frame* frame) On 2016/01/16 00:49:49, alexmos wrote: > ...
4 years, 11 months ago (2016-01-20 05:56:22 UTC) #7
alexmos
Thanks, just a couple of nits below and a question about active mixed content tests. ...
4 years, 11 months ago (2016-01-20 22:43:55 UTC) #8
estark
https://codereview.chromium.org/1550723003/diff/120001/content/browser/site_per_process_browsertest.cc File content/browser/site_per_process_browsertest.cc (right): https://codereview.chromium.org/1550723003/diff/120001/content/browser/site_per_process_browsertest.cc#newcode4678 content/browser/site_per_process_browsertest.cc:4678: IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, PassiveMixedContent) { On 2016/01/20 22:43:55, alexmos wrote: > ...
4 years, 11 months ago (2016-01-21 04:40:13 UTC) #9
alexmos
https://codereview.chromium.org/1550723003/diff/120001/content/browser/site_per_process_browsertest.cc File content/browser/site_per_process_browsertest.cc (right): https://codereview.chromium.org/1550723003/diff/120001/content/browser/site_per_process_browsertest.cc#newcode4689 content/browser/site_per_process_browsertest.cc:4689: PassiveMixedContentInIframe) { On 2016/01/21 04:40:13, estark wrote: > On ...
4 years, 11 months ago (2016-01-21 18:13:28 UTC) #10
alexmos
https://codereview.chromium.org/1550723003/diff/120001/content/browser/site_per_process_browsertest.cc File content/browser/site_per_process_browsertest.cc (right): https://codereview.chromium.org/1550723003/diff/120001/content/browser/site_per_process_browsertest.cc#newcode4689 content/browser/site_per_process_browsertest.cc:4689: PassiveMixedContentInIframe) { On 2016/01/21 18:13:28, alexmos wrote: > On ...
4 years, 11 months ago (2016-01-21 18:21:51 UTC) #11
estark
On 2016/01/21 18:13:28, alexmos wrote: > https://codereview.chromium.org/1550723003/diff/120001/content/browser/site_per_process_browsertest.cc > File content/browser/site_per_process_browsertest.cc (right): > > https://codereview.chromium.org/1550723003/diff/120001/content/browser/site_per_process_browsertest.cc#newcode4689 > ...
4 years, 11 months ago (2016-01-21 20:54:07 UTC) #12
alexmos
Thanks, LGTM. https://codereview.chromium.org/1550723003/diff/240001/content/browser/site_per_process_browsertest.cc File content/browser/site_per_process_browsertest.cc (right): https://codereview.chromium.org/1550723003/diff/240001/content/browser/site_per_process_browsertest.cc#newcode4953 content/browser/site_per_process_browsertest.cc:4953: ActiveMixedContentInIframe) { This test is great. Just ...
4 years, 11 months ago (2016-01-21 22:38:41 UTC) #13
estark
https://codereview.chromium.org/1550723003/diff/240001/content/browser/site_per_process_browsertest.cc File content/browser/site_per_process_browsertest.cc (right): https://codereview.chromium.org/1550723003/diff/240001/content/browser/site_per_process_browsertest.cc#newcode4953 content/browser/site_per_process_browsertest.cc:4953: ActiveMixedContentInIframe) { On 2016/01/21 22:38:41, alexmos wrote: > This ...
4 years, 11 months ago (2016-01-21 23:24:15 UTC) #14
estark
Thanks for the review and all the help, Alex! mkwst, could you please take a ...
4 years, 11 months ago (2016-01-21 23:35:49 UTC) #16
Mike West
I've only skimmed the bits outside of Blink, but this LGTM. Thanks for taking the ...
4 years, 11 months ago (2016-01-22 12:59:22 UTC) #17
estark
Thanks Mike! jochen, could you please review changes in content/? https://codereview.chromium.org/1550723003/diff/280001/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp File third_party/WebKit/Source/core/loader/MixedContentChecker.cpp (right): https://codereview.chromium.org/1550723003/diff/280001/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp#newcode311 ...
4 years, 11 months ago (2016-01-22 17:37:37 UTC) #19
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1550723003/diff/280001/third_party/WebKit/LayoutTests/http/tests/security/mixedContent/strict-mode-image-in-frame-blocked.https-expected.txt File third_party/WebKit/LayoutTests/http/tests/security/mixedContent/strict-mode-image-in-frame-blocked.https-expected.txt (right): https://codereview.chromium.org/1550723003/diff/280001/third_party/WebKit/LayoutTests/http/tests/security/mixedContent/strict-mode-image-in-frame-blocked.https-expected.txt#newcode1 third_party/WebKit/LayoutTests/http/tests/security/mixedContent/strict-mode-image-in-frame-blocked.https-expected.txt:1: CONSOLE ERROR: Mixed Content: The page at 'https://127.0.0.1:8443/security/mixedContent/strict-mode-image-in-frame-blocked.https.html' was ...
4 years, 11 months ago (2016-01-25 11:33:29 UTC) #20
estark
https://codereview.chromium.org/1550723003/diff/280001/third_party/WebKit/LayoutTests/http/tests/security/mixedContent/strict-mode-image-in-frame-blocked.https-expected.txt File third_party/WebKit/LayoutTests/http/tests/security/mixedContent/strict-mode-image-in-frame-blocked.https-expected.txt (right): https://codereview.chromium.org/1550723003/diff/280001/third_party/WebKit/LayoutTests/http/tests/security/mixedContent/strict-mode-image-in-frame-blocked.https-expected.txt#newcode1 third_party/WebKit/LayoutTests/http/tests/security/mixedContent/strict-mode-image-in-frame-blocked.https-expected.txt:1: CONSOLE ERROR: Mixed Content: The page at 'https://127.0.0.1:8443/security/mixedContent/strict-mode-image-in-frame-blocked.https.html' was ...
4 years, 11 months ago (2016-01-25 16:21:06 UTC) #21
jochen (gone - plz use gerrit)
lgtm
4 years, 11 months ago (2016-01-26 11:44:58 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1550723003/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1550723003/280001
4 years, 11 months ago (2016-01-26 16:10:23 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/121879) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 11 months ago (2016-01-26 16:12:28 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1550723003/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1550723003/300001
4 years, 11 months ago (2016-01-26 16:21:29 UTC) #30
commit-bot: I haz the power
Committed patchset #16 (id:300001)
4 years, 11 months ago (2016-01-26 17:58:40 UTC) #32
commit-bot: I haz the power
4 years, 11 months ago (2016-01-26 17:59:51 UTC) #34
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/56dc8e2191815bb5b64a5b81b5f1c4db7828b6ed
Cr-Commit-Position: refs/heads/master@{#371534}

Powered by Google App Engine
This is Rietveld 408576698