Skip to content

Commit 1b3a0a8

Browse files
Abort verified JSON-RPC connections with no valid endpoint
1 parent dfde827 commit 1b3a0a8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/remote/apilistener.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,12 @@ void ApiListener::NewClientHandlerInternal(
834834
if (ctype == ClientJsonRpc) {
835835
Log(LogNotice, "ApiListener", "New JSON-RPC client");
836836

837+
if (verify_ok && !endpoint) {
838+
Log(LogWarning, "ApiListener")
839+
<< "Unknown endpoint '" << identity << "' with valid certificate. Aborting JSON-RPC connection.";
840+
return;
841+
}
842+
837843
if (endpoint && endpoint->GetConnected()) {
838844
Log(LogInformation, "ApiListener")
839845
<< "Ignoring JSON-RPC connection " << conninfo

0 commit comments

Comments
 (0)