Pass ALL parameters through connect, allowing arbitrary additional parameters to...
authorMichael Jumper <zhangmaike@users.sourceforge.net>
Fri, 23 Mar 2012 08:00:43 +0000 (01:00 -0700)
committerMichael Jumper <zhangmaike@users.sourceforge.net>
Fri, 23 Mar 2012 08:00:43 +0000 (01:00 -0700)
src/main/webapp/client.xhtml
src/main/webapp/index.xhtml

index c0b0749..9213907 100644 (file)
 
                     try {
 
-                        // Get ID
-                        var id = window.location.search.substring(1);
+                        // Get entire query string, and pass to connect().
+                        // Normally, only the "id" parameter is required, but
+                        // all parameters should be preserved and passed on for
+                        // the sake of authentication.
 
-                        // Connect client
-                        guac.connect("id=" + id);
+                        var connect_string = window.location.search.substring(1);
+                        guac.connect(connect_string);
 
                     }
                     catch (e) {
index 463d90b..3db5d5a 100644 (file)
 
                 // If only one connection, redirect to that.
                 if (configs.length == 1) {
-                    window.location.href = "client.xhtml?" + encodeURIComponent(configs[0].id);
+                    window.location.href = "client.xhtml?id=" + encodeURIComponent(configs[0].id);
                     return;
                 }