aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authortobtoht <tob@featherwallet.org>2026-04-29 13:15:23 +0000
committertobtoht <tob@featherwallet.org>2026-04-29 13:15:23 +0000
commit31fbbc11bdc5b78223a98b12a523ff0b10ecc5d5 (patch)
tree29d9f373819a1676599bbd8511347536524422df /src/wallet
parentccc3b94e2bc273e9ba67ae222f54bc37e9702f6d (diff)
parentf855ffe87ddc593b286ad02f84b24b804872773a (diff)
downloadmonzero-core-31fbbc11bdc5b78223a98b12a523ff0b10ecc5d5.tar.gz
monzero-core-31fbbc11bdc5b78223a98b12a523ff0b10ecc5d5.tar.xz
monzero-core-31fbbc11bdc5b78223a98b12a523ff0b10ecc5d5.zip
Merge pull request #10481
f855ffe wallet2: throw if reserve proof can't be parsed (tobtoht)
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet2.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 77ab7299b..e8170131c 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -13387,13 +13387,19 @@ bool wallet2::check_reserve_proof(const cryptonote::account_public_address &addr
loaded = true;
}
catch(...) {}
- if (!loaded && m_load_deprecated_formats)
+ try
{
- std::istringstream iss(sig_decoded);
- boost::archive::portable_binary_iarchive ar(iss);
- ar >> proofs >> subaddr_spendkeys.parent();
+ if (!loaded && m_load_deprecated_formats)
+ {
+ std::istringstream iss(sig_decoded);
+ boost::archive::portable_binary_iarchive ar(iss);
+ ar >> proofs >> subaddr_spendkeys.parent();
+ loaded = true;
+ }
}
+ catch(...) {}
+ THROW_WALLET_EXCEPTION_IF(!loaded, error::wallet_internal_error, "Failed to parse reserve proof signature data");
THROW_WALLET_EXCEPTION_IF(subaddr_spendkeys.count(address.m_spend_public_key) == 0, error::wallet_internal_error,
"The given address isn't found in the proof");