mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 13:03:17 +01:00
Merge pull request #5461
aa768f1
signrawtransaction: validate private key. (Pavel Janík)
This commit is contained in:
commit
5f7279ac70
@ -587,6 +587,8 @@ Value signrawtransaction(const Array& params, bool fHelp)
|
|||||||
if (!fGood)
|
if (!fGood)
|
||||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid private key");
|
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid private key");
|
||||||
CKey key = vchSecret.GetKey();
|
CKey key = vchSecret.GetKey();
|
||||||
|
if (!key.IsValid())
|
||||||
|
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Private key outside allowed range");
|
||||||
tempKeystore.AddKey(key);
|
tempKeystore.AddKey(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user