diff options
| author | Gabriel Davidian <[email protected]> | 2018-03-25 18:25:09 +0000 |
|---|---|---|
| committer | Gabriel Davidian <[email protected]> | 2018-03-25 18:25:09 +0000 |
| commit | 4d74c78c69123a3d97293f40337e2efa5dadbff0 (patch) | |
| tree | 8a5bb1358c8aff0e88e92d2534cd8eb4dc1ba8be /src/httprpc.cpp | |
| parent | Merge #12760: Docs: Improve documentation on standard communication channels (diff) | |
| download | discoin-4d74c78c69123a3d97293f40337e2efa5dadbff0.tar.xz discoin-4d74c78c69123a3d97293f40337e2efa5dadbff0.zip | |
Add username and ip logging for RPC method requests
Diffstat (limited to 'src/httprpc.cpp')
| -rw-r--r-- | src/httprpc.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/httprpc.cpp b/src/httprpc.cpp index 82ae73300..7eb9fa671 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 |