More security changes.

This commit is contained in:
Arthur Britto
2013-01-18 01:41:48 -08:00
parent bda80d4144
commit e69d309cb3
5 changed files with 46 additions and 12 deletions

View File

@@ -590,11 +590,17 @@ int commandLineRPC(const std::vector<std::string>& vCmd)
jvParams.append(jvRequest);
if (!theConfig.RPC_ADMIN_USER.empty())
jvRequest["admin_user"] = theConfig.RPC_ADMIN_USER;
if (!theConfig.RPC_ADMIN_PASSWORD.empty())
jvRequest["admin_password"] = theConfig.RPC_ADMIN_PASSWORD;
jvOutput = callRPC(
theConfig.RPC_IP,
theConfig.RPC_PORT,
theConfig.RPC_ADMIN_USER,
theConfig.RPC_ADMIN_PASSWORD,
theConfig.RPC_USER,
theConfig.RPC_PASSWORD,
"",
jvRequest.isMember("method") // Allow parser to rewrite method.
? jvRequest["method"].asString()