GUACAMOLE-1047: Merge notify connecting client of invalid connection IDs.

This commit is contained in:
Virtually Nick 2021-12-19 18:39:15 -05:00 committed by GitHub
commit b9cc76058b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -278,10 +278,13 @@ static int guacd_route_connection(guacd_proc_map* map, guac_socket* socket) {
proc = guacd_proc_map_retrieve(map, identifier); proc = guacd_proc_map_retrieve(map, identifier);
new_process = 0; new_process = 0;
/* Warn if requested connection does not exist */ /* Warn and ward off client if requested connection does not exist */
if (proc == NULL) if (proc == NULL) {
guacd_log(GUAC_LOG_INFO, "Connection \"%s\" does not exist.", guacd_log(GUAC_LOG_INFO, "Connection \"%s\" does not exist", identifier);
identifier); guac_protocol_send_error(socket, "No such connection.",
GUAC_PROTOCOL_STATUS_RESOURCE_NOT_FOUND);
}
else else
guacd_log(GUAC_LOG_INFO, "Joining existing connection \"%s\"", guacd_log(GUAC_LOG_INFO, "Joining existing connection \"%s\"",
identifier); identifier);