From 7f718139191d67da29c5d856d29e035bbc51e659 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Wed, 17 Dec 2014 09:34:09 +0000 Subject: 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 --- src/rpcmining.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/rpcmining.cpp') 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(); -- cgit v1.2.3