mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
catch wallet decrypt false positive
This commit is contained in:
parent
8512a83572
commit
a1e3670b33
1 changed files with 6 additions and 1 deletions
|
@ -2289,7 +2289,7 @@ bool wallet2::load_keys(const std::string& keys_file_name, const std::string& pa
|
|||
m_confirm_backlog = true;
|
||||
m_confirm_backlog_threshold = 0;
|
||||
}
|
||||
else
|
||||
else if(json.IsObject())
|
||||
{
|
||||
if (!json.HasMember("key_data"))
|
||||
{
|
||||
|
@ -2368,6 +2368,11 @@ bool wallet2::load_keys(const std::string& keys_file_name, const std::string& pa
|
|||
// Wallet is being opened without testnet flag but is saved as a testnet wallet.
|
||||
THROW_WALLET_EXCEPTION_IF(!m_testnet && field_testnet, error::wallet_internal_error, "Testnet wallet can not be opened as mainnet wallet");
|
||||
}
|
||||
else
|
||||
{
|
||||
THROW_WALLET_EXCEPTION(error::wallet_internal_error, "invalid password");
|
||||
return false;
|
||||
}
|
||||
|
||||
const cryptonote::account_keys& keys = m_account.get_keys();
|
||||
r = epee::serialization::load_t_from_binary(m_account, account_data);
|
||||
|
|
Loading…
Reference in a new issue