From 9f0f95a2e8a061a74b31e9a91ec91fbfb564bd3e Mon Sep 17 00:00:00 2001 From: Anthony Tseng Date: Mon, 25 Sep 2017 13:09:02 -0700 Subject: [PATCH] Fix secure cookies using http url fix https://github.com/brave/browser-laptop/issues/11089 Auditors: @bbondy, @bsclifton --- atom/browser/importer/profile_writer.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/atom/browser/importer/profile_writer.cc b/atom/browser/importer/profile_writer.cc index 12f847f987..f9cb1eb0bd 100644 --- a/atom/browser/importer/profile_writer.cc +++ b/atom/browser/importer/profile_writer.cc @@ -177,11 +177,11 @@ void ProfileWriter::AddCookies( for (const ImportedCookieEntry& cookie_entry : cookies) { base::DictionaryValue* cookie = new base::DictionaryValue(); base::string16 url; - if (cookie_entry.httponly) { - url.append(base::UTF8ToUTF16("http://")); + if (cookie_entry.secure) { + url.append(base::UTF8ToUTF16("https://")); url.append(cookie_entry.host); } else { - url.append(base::UTF8ToUTF16("https://")); + url.append(base::UTF8ToUTF16("http://")); url.append(cookie_entry.host); } cookie->SetString("url", url);