aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authoritssteven <steven@tuta.io>2018-05-06 17:42:27 +0100
committerGitHub <noreply@github.com>2018-05-06 17:42:27 +0100
commiteb9f3a3294c1c57009ec1b8f6428932caa4ccacf (patch)
tree67ec1493660fb2ac04f449c2043895275635450e /src/wallet/wallet2.cpp
parentMerge pull request #3752 (diff)
downloadmonero-eb9f3a3294c1c57009ec1b8f6428932caa4ccacf.tar.xz
check_spend_proof
My intention is to mitigate #3761 by returning "bad signature", rather than throwing an error, as the error is triggered inappropriately in the case of checking a different txid than the one used to create the signature, which causes issues for monerophp: https://github.com/monero-integrations/monerophp/issues/72 & my temp fix: https://github.com/monero-integrations/monerophp/pull/74
Diffstat (limited to '')
-rw-r--r--src/wallet/wallet2.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index d53ed82a9..b14b88a9a 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -8414,8 +8414,9 @@ bool wallet2::check_spend_proof(const crypto::hash &txid, const std::string &mes
}
std::vector<std::vector<crypto::signature>> signatures = { std::vector<crypto::signature>(1) };
const size_t sig_len = tools::base58::encode(std::string((const char *)&signatures[0][0], sizeof(crypto::signature))).size();
- THROW_WALLET_EXCEPTION_IF(sig_str.size() != header_len + num_sigs * sig_len,
- error::wallet_internal_error, "incorrect signature size");
+ if( sig_str.size() != header_len + num_sigs * sig_len ) {
+ return false;
+ }
// decode base58
signatures.clear();