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

Issue 181253003: Downgrade page security if an inline has invalid certificate.

Created:
6 years, 10 months ago by joleksy
Modified:
5 years, 9 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

If an inline loaded resource has invalid certificate, the overall security of the webpage should be downgraded.

Patch Set 1 #

Total comments: 2

Patch Set 2 : Review follow up: added browser test. #

Total comments: 2

Patch Set 3 : Updated browser test & formatting fix. #

Total comments: 1

Patch Set 4 : Comments added. #

Total comments: 4

Patch Set 5 : Comments shortened. #

Patch Set 6 : Do not downgrade page security if inline cert error is minor. #

Patch Set 7 : Rebased. #

Patch Set 8 : Fixed browser tests. #

Patch Set 9 : Do not set insecure content flag for favicon loading. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -4 lines) Patch
M chrome/browser/ssl/ssl_browser_tests.cc View 1 2 3 4 5 6 7 3 chunks +44 lines, -2 lines 0 comments Download
M chrome/test/data/ssl/page_with_dynamic_insecure_content.html View 1 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 3 chunks +25 lines, -0 lines 0 comments Download

Messages

Total messages: 51 (2 generated)
joleksy
@reviewer: does this patch look OK to you?
6 years, 10 months ago (2014-02-26 12:04:25 UTC) #1
sky
Security stuff always makes me nervous. +creis
6 years, 10 months ago (2014-02-26 14:31:54 UTC) #2
Charlie Reis
Thanks, sky! Adam, you might know the right place for this code, though I know ...
6 years, 9 months ago (2014-02-26 18:49:05 UTC) #3
Ryan Sleevi
On 2014/02/26 18:49:05, Charlie Reis wrote: > Thanks, sky! > > Adam, you might know ...
6 years, 9 months ago (2014-02-26 18:53:14 UTC) #4
abarth-chromium
https://codereview.chromium.org/181253003/diff/1/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://codereview.chromium.org/181253003/diff/1/content/browser/web_contents/web_contents_impl.cc#newcode1810 content/browser/web_contents/web_contents_impl.cc:1810: displayed_insecure_content_ = true; On 2014/02/26 18:49:06, Charlie Reis wrote: ...
6 years, 9 months ago (2014-02-26 19:17:06 UTC) #5
joleksy
On 2014/02/26 19:17:06, abarth wrote: > https://codereview.chromium.org/181253003/diff/1/content/browser/web_contents/web_contents_impl.cc > File content/browser/web_contents/web_contents_impl.cc (right): > > https://codereview.chromium.org/181253003/diff/1/content/browser/web_contents/web_contents_impl.cc#newcode1810 > ...
6 years, 9 months ago (2014-02-27 07:37:10 UTC) #6
joleksy
6 years, 9 months ago (2014-02-27 15:21:30 UTC) #7
joleksy
On 2014/02/27 07:37:10, joleksy wrote: > On 2014/02/26 19:17:06, abarth wrote: > > > https://codereview.chromium.org/181253003/diff/1/content/browser/web_contents/web_contents_impl.cc ...
6 years, 9 months ago (2014-02-27 15:32:46 UTC) #8
Charlie Reis
Sorry, this level of detail is beyond my knowledge and I didn't have time to ...
6 years, 9 months ago (2014-02-28 02:07:59 UTC) #9
palmer
On 2014/02/28 02:07:59, Charlie Reis wrote: > Sorry, this level of detail is beyond my ...
6 years, 9 months ago (2014-03-04 00:23:21 UTC) #10
Charlie Reis
On 2014/03/04 00:23:21, Chromium Palmer wrote: > On 2014/02/28 02:07:59, Charlie Reis wrote: > > ...
6 years, 9 months ago (2014-03-04 00:30:07 UTC) #11
Ryan Sleevi
Sorry for the delay. More tests? :) https://codereview.chromium.org/181253003/diff/20001/chrome/browser/ssl/ssl_browser_tests.cc File chrome/browser/ssl/ssl_browser_tests.cc (right): https://codereview.chromium.org/181253003/diff/20001/chrome/browser/ssl/ssl_browser_tests.cc#newcode1114 chrome/browser/ssl/ssl_browser_tests.cc:1114: } Can ...
6 years, 9 months ago (2014-03-11 01:39:39 UTC) #12
joleksy
On 2014/03/11 01:39:39, Ryan Sleevi wrote: > Sorry for the delay. More tests? :) > ...
6 years, 9 months ago (2014-03-14 09:51:09 UTC) #13
Ryan Sleevi
On 2014/03/14 09:51:09, joleksy wrote: > On 2014/03/11 01:39:39, Ryan Sleevi wrote: > > Sorry ...
6 years, 9 months ago (2014-03-14 21:12:29 UTC) #14
joleksy
On 2014/03/14 21:12:29, Ryan Sleevi wrote: > On 2014/03/14 09:51:09, joleksy wrote: > > On ...
6 years, 9 months ago (2014-03-17 13:51:40 UTC) #15
Ryan Sleevi
On Mar 17, 2014 6:51 AM, <joleksy@opera.com> wrote: > > On 2014/03/14 21:12:29, Ryan Sleevi ...
6 years, 9 months ago (2014-03-17 15:01:24 UTC) #16
joleksy
On 2014/03/17 15:01:24, Ryan Sleevi wrote: > On Mar 17, 2014 6:51 AM, <mailto:joleksy@opera.com> wrote: ...
6 years, 9 months ago (2014-03-18 11:57:56 UTC) #17
Ryan Sleevi
On 2014/03/18 11:57:56, joleksy wrote: > On 2014/03/17 15:01:24, Ryan Sleevi wrote: > > On ...
6 years, 9 months ago (2014-03-18 21:04:23 UTC) #18
joleksy
On 2014/03/18 21:04:23, Ryan Sleevi wrote: > > Fair enough. I think we can probably ...
6 years, 9 months ago (2014-03-21 09:31:43 UTC) #19
joleksy
On 2014/03/21 09:31:43, joleksy wrote: > On 2014/03/18 21:04:23, Ryan Sleevi wrote: > > > ...
6 years, 9 months ago (2014-03-21 09:32:48 UTC) #20
Ryan Sleevi
LGTM, mod style nit. https://codereview.chromium.org/181253003/diff/20001/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://codereview.chromium.org/181253003/diff/20001/content/browser/web_contents/web_contents_impl.cc#newcode1811 content/browser/web_contents/web_contents_impl.cc:1811: } style nit: Throughout this ...
6 years, 9 months ago (2014-03-21 20:22:54 UTC) #21
joleksy
On 2014/03/21 20:22:54, Ryan Sleevi wrote: > LGTM, mod style nit. > > https://codereview.chromium.org/181253003/diff/20001/content/browser/web_contents/web_contents_impl.cc > ...
6 years, 8 months ago (2014-04-09 13:09:12 UTC) #22
Ryan Sleevi
On 2014/04/09 13:09:12, joleksy wrote: > On 2014/03/21 20:22:54, Ryan Sleevi wrote: > > LGTM, ...
6 years, 8 months ago (2014-04-09 16:51:08 UTC) #23
Charlie Reis
Thanks for working through it. LGTM once you add the comment mentioned below. https://codereview.chromium.org/181253003/diff/40001/content/browser/web_contents/web_contents_impl.cc File ...
6 years, 8 months ago (2014-04-09 17:20:17 UTC) #24
joleksy
On 2014/04/09 17:20:17, Charlie Reis wrote: > Can you add a comment to that effect ...
6 years, 8 months ago (2014-04-10 13:48:39 UTC) #25
Charlie Reis
Great! I think you can even trim it down a bit. :) LGTM with the ...
6 years, 8 months ago (2014-04-10 16:57:19 UTC) #26
joleksy
On 2014/04/10 16:57:19, Charlie Reis wrote: > Great! I think you can even trim it ...
6 years, 8 months ago (2014-04-11 06:17:54 UTC) #27
Charlie Reis
Great, thanks. Still LGTM.
6 years, 8 months ago (2014-04-11 16:01:47 UTC) #28
joleksy
On 2014/04/11 16:01:47, Charlie Reis wrote: > Great, thanks. Still LGTM. There is one more ...
6 years, 8 months ago (2014-04-14 13:27:28 UTC) #29
joleksy
On 2014/04/14 13:27:28, joleksy wrote: > On 2014/04/11 16:01:47, Charlie Reis wrote: > > Great, ...
6 years, 8 months ago (2014-04-15 07:35:27 UTC) #30
Ryan Sleevi
lgtm
6 years, 8 months ago (2014-04-16 19:45:05 UTC) #31
joleksy
On 2014/04/16 19:45:05, Ryan Sleevi wrote: > lgtm Hey, is there any chance of having ...
6 years, 3 months ago (2014-09-04 07:31:37 UTC) #32
Ryan Sleevi
On 2014/09/04 07:31:37, joleksy wrote: > On 2014/04/16 19:45:05, Ryan Sleevi wrote: > > lgtm ...
6 years, 3 months ago (2014-09-04 19:48:47 UTC) #33
joleksy
On 2014/09/04 19:48:47, Ryan Sleevi wrote: > On 2014/09/04 07:31:37, joleksy wrote: > > On ...
6 years, 3 months ago (2014-09-05 08:56:13 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joleksy@opera.com/181253003/120001
6 years, 3 months ago (2014-09-08 07:55:09 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_swarming on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_swarming/builds/11110)
6 years, 3 months ago (2014-09-08 09:02:25 UTC) #38
joleksy
On 2014/09/08 09:02:25, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
6 years, 3 months ago (2014-09-10 12:20:00 UTC) #39
Ryan Sleevi
On 2014/09/10 12:20:00, joleksy wrote: > On 2014/09/08 09:02:25, I haz the power (commit-bot) wrote: ...
6 years, 3 months ago (2014-09-10 21:40:16 UTC) #40
joleksy
On 2014/09/10 21:40:16, Ryan Sleevi wrote: > On 2014/09/10 12:20:00, joleksy wrote: > > On ...
6 years, 3 months ago (2014-09-11 06:43:10 UTC) #41
joleksy
On 2014/09/11 06:43:10, joleksy wrote: > On 2014/09/10 21:40:16, Ryan Sleevi wrote: > > On ...
6 years, 3 months ago (2014-09-11 08:40:16 UTC) #42
Ryan Sleevi
On 2014/09/11 08:40:16, joleksy wrote: > Now I set the flag only when what we ...
6 years, 3 months ago (2014-09-12 00:32:48 UTC) #43
Ryan Sleevi
On 2014/09/12 00:32:48, Ryan Sleevi wrote: > On 2014/09/11 08:40:16, joleksy wrote: > > Now ...
6 years, 3 months ago (2014-09-12 00:48:21 UTC) #44
joleksy
On 2014/09/12 00:48:21, Ryan Sleevi wrote: > On 2014/09/12 00:32:48, Ryan Sleevi wrote: > > ...
6 years, 3 months ago (2014-09-12 07:15:01 UTC) #45
joleksy
On 2014/09/12 07:15:01, joleksy wrote: > On 2014/09/12 00:48:21, Ryan Sleevi wrote: > > On ...
6 years, 2 months ago (2014-10-07 11:52:50 UTC) #46
Ryan Sleevi
On 2014/10/07 11:52:50, joleksy wrote: > On 2014/09/12 07:15:01, joleksy wrote: > > On 2014/09/12 ...
6 years, 2 months ago (2014-10-17 20:35:23 UTC) #47
joleksy
On 2014/10/17 20:35:23, Ryan Sleevi (OOO until 11-18) wrote: > On 2014/10/07 11:52:50, joleksy wrote: ...
6 years, 1 month ago (2014-11-12 08:30:40 UTC) #48
Mike West
On 2014/11/12 08:30:40, joleksy wrote: > Sorry, I have been away for some time. > ...
6 years, 1 month ago (2014-11-12 12:22:24 UTC) #49
joleksy
On 2014/11/12 12:22:24, Mike West (sick) wrote: > On 2014/11/12 08:30:40, joleksy wrote: > > ...
6 years ago (2014-12-11 08:27:59 UTC) #50
joleksy
5 years, 9 months ago (2015-02-27 14:24:14 UTC) #51
On 2014/12/11 08:27:59, joleksy wrote:
> On 2014/11/12 12:22:24, Mike West (sick) wrote:
> > On 2014/11/12 08:30:40, joleksy wrote:
> > > Sorry, I have been away for some time.
> > > What seems to be happening here is that favicon is loaded after
> > > DidNavigateMainFramePostCommit resets insecure content flag.
> > > If we are to consider favicon in the mixed content check then probably
some
> > more
> > > sophisticated solution would be needed.
> > 
> > Given that the favicon is associated with the page, it's not clear to me why
> > it's a good idea to avoid the mixed content (or CSP) checks. Note also that
> the
> > spec includes the `favicon` context as "blockable content":
> > https://w3c.github.io/webappsec/specs/mixedcontent/#category-blockable. We
> > should really be blocking the load entirely (which would have the nice
> > side-effect of restoring the page's secure UI, as the content would be
blocked
> > rather than displayed).
> 
> Right. (Again, sorry for delay).
> 
> So, the problem as I see it comes from the fact that the security status is
> being kept in a global flag, the flag is being reset after the whole page
loads
> (in DidNavigateMainFramePostCommit).
> The time when favicon is loaded is not totally deterministic (correct me if I
am
> wrong), it can occur before or after DidNavigateMainFramePostCommit. If it
> occurs after DidNavigateMainFramePostCommit (and after resetting the flag), it
> sets the flag, but DidNavigateMainFramePostCommit never comes afterwards and
the
> flag is not reset, making the favicon an unsafe resource.
> 
> I am not sure how we should approach this, any tips?
> 
> Maybe a separate flag for each host would help?

PING?

Powered by Google App Engine
This is Rietveld 408576698