necouchman commented on a change in pull request #271:
URL: https://github.com/apache/guacamole-server/pull/271#discussion_r413824810



##########
File path: src/guacd/connection.c
##########
@@ -278,10 +278,18 @@ static int guacd_route_connection(guacd_proc_map* map, 
guac_socket* socket) {
         proc = guacd_proc_map_retrieve(map, identifier);
         new_process = 0;
 
-        /* Warn if requested connection does not exist */
-        if (proc == NULL)
-            guacd_log(GUAC_LOG_INFO, "Connection \"%s\" does not exist.",
-                    identifier);
+        /* Warn and ward off client if requested connection does not exist */
+        if (proc == NULL) {
+            char message[2048];
+
+            snprintf(message, sizeof(message),
+                    "Connection \"%s\" does not exist", identifier);
+
+            guacd_log(GUAC_LOG_INFO, message);
+            guac_protocol_send_error(socket, message,
+                    GUAC_PROTOCOL_STATUS_CLIENT_BAD_REQUEST);

Review comment:
       In general I think this is probably a good thing to do, but, have you 
tested the mainstream Guacamole Client with these changes?  Presumably you're 
developing a custom application that interacts directly with guacd, but we need 
to make sure these changes are compatible with the upstream client.
   
   Also, I haven't looked, yet, but I'm guessing there may need to be some 
matching changes done within the guacamole-common-js code on the 
guacamole-client side of things to make sure errors are handled when send back 
by guacd?  Or maybe this is already in place?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to