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

Unified Diff: content/browser/frame_host/navigation_controller_impl.cc

Issue 2707133003: Fix SSL certificate being wrong in the intended_as_new_entry fase of NAVIGATION_TYPE_EXISTING_PAGE. (Closed)
Patch Set: update Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_controller_impl.cc
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
index 9d441badaa0e423a3b7a0cc55c016123ce76ab40..690241bdb91c89732f9d49e2947edac80cb50a21 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -1101,6 +1101,12 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
new_entry = GetLastCommittedEntry()->CloneAndReplace(
frame_entry, true, rfh->frame_tree_node(),
delegate_->GetFrameTree()->root());
+ if (new_entry->GetURL().GetOrigin() != params.url.GetOrigin()) {
+ // TODO(jam): we had one report of this with a URL that was redirecting to
+ // only tildes. Until we understand that better, don't copy the cert in
+ // this case.
+ new_entry->GetSSL() = SSLStatus();
+ }
// We expect |frame_entry| to be owned by |new_entry|. This should never
// fail, because it's the main frame.
@@ -1212,6 +1218,8 @@ void NavigationControllerImpl::RendererDidNavigateToExistingPage(
// meanwhile and no new page was created. We are stuck at the last committed
// entry.
entry = GetLastCommittedEntry();
+ CHECK(!is_in_page);
+ entry->GetSSL() = handle->ssl_status();
} else if (params.nav_entry_id) {
// This is a browser-initiated navigation (back/forward/reload).
entry = GetEntryWithUniqueID(params.nav_entry_id);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698