aboutsummaryrefslogtreecommitdiff
path: root/src/httprpc.cpp
diff options
context:
space:
mode:
authorGabriel Davidian <gabrielius.dav@gmail.com>2018-03-25 18:25:09 +0000
committerGabriel Davidian <gabrielius.dav@gmail.com>2018-03-25 18:25:09 +0000
commit4d74c78c69123a3d97293f40337e2efa5dadbff0 (patch)
tree8a5bb1358c8aff0e88e92d2534cd8eb4dc1ba8be /src/httprpc.cpp
parent7466a26cab5d66665991433947964a638f5b957e (diff)
Add username and ip logging for RPC method requests
Diffstat (limited to 'src/httprpc.cpp')
-rw-r--r--src/httprpc.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/httprpc.cpp b/src/httprpc.cpp
index 82ae733006..7eb9fa671c 100644
--- a/src/httprpc.cpp
+++ b/src/httprpc.cpp
@@ -158,8 +158,9 @@ static bool HTTPReq_JSONRPC(HTTPRequest* req, const std::string &)
}
JSONRPCRequest jreq;
+ jreq.peerAddr = req->GetPeer().ToString();
if (!RPCAuthorized(authHeader.second, jreq.authUser)) {
- LogPrintf("ThreadRPCServer incorrect password attempt from %s\n", req->GetPeer().ToString());
+ LogPrintf("ThreadRPCServer incorrect password attempt from %s\n", jreq.peerAddr);
/* Deter brute-forcing
If this results in a DoS the user really