Skip to content

Commit 3d04eb4

Browse files
authored
Merge pull request #10415 from Icinga/abort-no-endpoint-conns
Abort connections with no valid endpoint
2 parents c253e7e + 353386f commit 3d04eb4

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
@@ -835,6 +835,12 @@ void ApiListener::NewClientHandlerInternal(
835835
if (ctype == ClientJsonRpc) {
836836
Log(LogNotice, "ApiListener", "New JSON-RPC client");
837837

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

0 commit comments

Comments
 (0)