mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-26 11:08:51 +02:00
Merge pull request #10415 from Icinga/abort-no-endpoint-conns
Abort connections with no valid endpoint
This commit is contained in:
commit
3d04eb456a
@ -835,6 +835,12 @@ void ApiListener::NewClientHandlerInternal(
|
||||
if (ctype == ClientJsonRpc) {
|
||||
Log(LogNotice, "ApiListener", "New JSON-RPC client");
|
||||
|
||||
if (verify_ok && !endpoint) {
|
||||
Log(LogWarning, "ApiListener")
|
||||
<< "Unknown endpoint '" << identity << "' with valid certificate. Aborting JSON-RPC connection.";
|
||||
return;
|
||||
}
|
||||
|
||||
if (endpoint && endpoint->GetConnected()) {
|
||||
Log(LogInformation, "ApiListener")
|
||||
<< "Ignoring JSON-RPC connection " << conninfo
|
||||
|
Loading…
x
Reference in New Issue
Block a user