From 12d206e73d891ed64429433585c80ea7759096b3 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 23 Mar 2012 01:00:43 -0700 Subject: [PATCH] Pass ALL parameters through connect, allowing arbitrary additional parameters to be used for authentication. Previously, only an "id" parameter was passed to connect, and the contents of that parameter was the entire query string. --- guacamole/src/main/webapp/client.xhtml | 10 ++++++---- guacamole/src/main/webapp/index.xhtml | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/guacamole/src/main/webapp/client.xhtml b/guacamole/src/main/webapp/client.xhtml index c0b074925..9213907b2 100644 --- a/guacamole/src/main/webapp/client.xhtml +++ b/guacamole/src/main/webapp/client.xhtml @@ -128,11 +128,13 @@ 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) { diff --git a/guacamole/src/main/webapp/index.xhtml b/guacamole/src/main/webapp/index.xhtml index 463d90be3..3db5d5a06 100644 --- a/guacamole/src/main/webapp/index.xhtml +++ b/guacamole/src/main/webapp/index.xhtml @@ -116,7 +116,7 @@ // 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; }