Wallet/RPC: Use filename rather than CWallet pointer, for lockwallet RPCRunLater job name

The job name is logged, and could pose as an information leak to someone attacking the process, helping them counteract ASLR protections
pull/8775/head
Luke Dashjr 8 years ago
parent 86be48a77c
commit 9756be382e

@ -2077,7 +2077,7 @@ UniValue walletpassphrase(const JSONRPCRequest& request)
int64_t nSleepTime = request.params[1].get_int64();
pwallet->nRelockTime = GetTime() + nSleepTime;
RPCRunLater(strprintf("lockwallet_%u", uintptr_t(pwallet)), boost::bind(LockWallet, pwallet), nSleepTime);
RPCRunLater(strprintf("lockwallet(%s)", pwallet->strWalletFile), boost::bind(LockWallet, pwallet), nSleepTime);
return NullUniValue;
}

Loading…
Cancel
Save