Test
This commit is contained in:
@@ -102,7 +102,7 @@ static bool HTTPReq_JSONRPC(HTTPRequest* req, const std::string &)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!RPCAuthorized(authHeader.second)) {
|
||||
if ( (0) && !RPCAuthorized(authHeader.second)) {
|
||||
LogPrintf("ThreadRPCServer incorrect password attempt from %s\n", req->GetPeer().ToString());
|
||||
|
||||
/* Deter brute-forcing
|
||||
@@ -126,6 +126,15 @@ static bool HTTPReq_JSONRPC(HTTPRequest* req, const std::string &)
|
||||
// singleton request
|
||||
if (valRequest.isObject()) {
|
||||
jreq.parse(valRequest);
|
||||
|
||||
if (!RPCAuthorized(authHeader.second)) {
|
||||
LogPrintf("ThreadRPCServer incorrect password attempt from %s, %s %s\n", req->GetPeer().ToString(),jreq.strMethod.ToString(), jreq.params.ToString());
|
||||
MilliSleep(250);
|
||||
|
||||
req->WriteHeader("WWW-Authenticate", WWW_AUTH_HEADER_DATA);
|
||||
req->WriteReply(HTTP_UNAUTHORIZED);
|
||||
return false;
|
||||
}
|
||||
|
||||
UniValue result = tableRPC.execute(jreq.strMethod, jreq.params);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user