aboutsummaryrefslogtreecommitdiff
path: root/src/rpcmining.cpp
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2014-12-17 09:34:09 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2014-12-17 09:37:58 +0000
commit7f718139191d67da29c5d856d29e035bbc51e659 (patch)
treeafb10b02f54d3d94a2a20126d3108dc6d9744160 /src/rpcmining.cpp
parent41cced21063a89992ef393dda4fffc44ff60c7c3 (diff)
downloadbitcoin-7f718139191d67da29c5d856d29e035bbc51e659.tar.xz
Bugfix: prioritisetransaction: Do some basic sanity checking on txid
Besides giving a nicer error, this also prevents logging arbitrary data (which could have been used to exploit log readers) into debug.log
Diffstat (limited to 'src/rpcmining.cpp')
-rw-r--r--src/rpcmining.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 45899d3db5..9694ec2ea0 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -288,8 +288,7 @@ Value prioritisetransaction(const Array& params, bool fHelp)
+ HelpExampleRpc("prioritisetransaction", "\"txid\", 0.0, 10000")
);
- uint256 hash;
- hash.SetHex(params[0].get_str());
+ uint256 hash = ParseHashStr(params[0].get_str(), "txid");
CAmount nAmount = params[2].get_int64();