Don't let clients get tx history arbitrarily far back.

This commit is contained in:
David Schwartz
2013-08-21 11:17:52 -07:00
parent 32aabc8999
commit c5a40141fe

View File

@@ -1803,6 +1803,10 @@ Json::Value RPCHandler::doTxHistory (Json::Value params, LoadType* loadType, App
return rpcError (rpcINVALID_PARAMS);
unsigned int startIndex = params["start"].asUInt ();
if ((startIndex > 10000) && (mRole != ADMIN))
return rpcError (rpcNO_PERMISSION);
Json::Value obj;
Json::Value txs;