From 3b72be62bead4452214acdc6c477f145a1a0f202 Mon Sep 17 00:00:00 2001 From: woodser Date: Thu, 25 Mar 2021 05:22:55 -0400 Subject: [PATCH] check for empty signature when checking proofs --- src/wallet/monero_wallet_full.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wallet/monero_wallet_full.cpp b/src/wallet/monero_wallet_full.cpp index fc204bc..c5e9190 100644 --- a/src/wallet/monero_wallet_full.cpp +++ b/src/wallet/monero_wallet_full.cpp @@ -2679,6 +2679,9 @@ namespace monero { throw std::runtime_error("TX hash has invalid format"); } + // validate signature + if (signature.empty()) throw std::runtime_error("Must provide signature to check spend proof"); + // check spend proof return m_w2->check_spend_proof(_tx_hash, message, signature); } @@ -2704,6 +2707,7 @@ namespace monero { cryptonote::address_parse_info info; if (!get_account_address_from_str(info, m_w2->nettype(), address)) throw std::runtime_error("Invalid address"); if (info.is_subaddress) throw std::runtime_error("Address must not be a subaddress"); + if (signature.empty()) throw std::runtime_error("Must provide signature to check reserve proof"); // initialize check reserve using wallet2 std::shared_ptr checkReserve = std::make_shared();