mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 18:47:36 -07:00
Merge pull request #2885
a1e3670b
catch wallet decrypt false positive (Riccardo Spagni)
This commit is contained in:
commit
87158dca68
@ -2302,7 +2302,7 @@ bool wallet2::load_keys(const std::string& keys_file_name, const epee::wipeable_
|
|||||||
m_confirm_backlog = true;
|
m_confirm_backlog = true;
|
||||||
m_confirm_backlog_threshold = 0;
|
m_confirm_backlog_threshold = 0;
|
||||||
}
|
}
|
||||||
else
|
else if(json.IsObject())
|
||||||
{
|
{
|
||||||
if (!json.HasMember("key_data"))
|
if (!json.HasMember("key_data"))
|
||||||
{
|
{
|
||||||
@ -2381,6 +2381,11 @@ bool wallet2::load_keys(const std::string& keys_file_name, const epee::wipeable_
|
|||||||
// Wallet is being opened without testnet flag but is saved as a testnet wallet.
|
// 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");
|
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();
|
const cryptonote::account_keys& keys = m_account.get_keys();
|
||||||
r = epee::serialization::load_t_from_binary(m_account, account_data);
|
r = epee::serialization::load_t_from_binary(m_account, account_data);
|
||||||
|
Loading…
Reference in New Issue
Block a user