Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
Don't call OSCrypt::IsEncryptionAvailable which will directly get pas…
Browse files Browse the repository at this point in the history
…sword before SetConfig()

fix brave/browser-laptop#11280 again

Auditors: @bridiver, @bbondy
  • Loading branch information
darkdh committed Oct 11, 2017
1 parent 9d81a62 commit 93c25d0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions brave/utility/importer/chrome_importer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,9 @@ void ChromeImporter::ImportCookies() {
net::CookieCryptoDelegate* delegate =
cookie_config::GetCookieCryptoDelegate();
std::string value;
if (!encrypted_value.empty() && delegate) {
#if defined(OS_LINUX)
if (!encrypted_value.empty() && delegate &&
OSCrypt::IsEncryptionAvailable()) {
OSCrypt::SetConfig(base::MakeUnique<os_crypt::Config>());
#else
if (!encrypted_value.empty() && delegate) {
#endif
if (!delegate->DecryptString(encrypted_value, &value)) {
continue;
Expand Down

0 comments on commit 93c25d0

Please sign in to comment.