From 1afe118481a6372de0bf75d3d02376508ffa72c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Tue, 13 Oct 2020 20:36:31 +0200 Subject: [PATCH] Removed url redirection from html5. Now guacamole always closes window after end --- guacamole-tunnel/src/main/webapp/scripts/client-ui.js | 5 +++-- server/src/uds/transports/HTML5RDP/html5rdp.py | 2 +- server/src/uds/transports/HTML5VNC/html5vnc.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/guacamole-tunnel/src/main/webapp/scripts/client-ui.js b/guacamole-tunnel/src/main/webapp/scripts/client-ui.js index 721868f80..7f437e908 100644 --- a/guacamole-tunnel/src/main/webapp/scripts/client-ui.js +++ b/guacamole-tunnel/src/main/webapp/scripts/client-ui.js @@ -1015,8 +1015,9 @@ GuacUI.Client.connect = function() { // Notify of disconnections (if not already notified of something else) tunnel.onstatechange = function(state) { if (state === Guacamole.Tunnel.State.CLOSED && !GuacUI.Client.visibleStatus) - //GuacUI.Client.showStatus("Disconnected", "You have been disconnected. Reload the page to reconnect."); - window.location = window.query.exit; + // window.location = window.query.exit; + // Better do this, disabling possible xss + window.close() }; // Connect diff --git a/server/src/uds/transports/HTML5RDP/html5rdp.py b/server/src/uds/transports/HTML5RDP/html5rdp.py index a4d68d350..bd26a6e08 100644 --- a/server/src/uds/transports/HTML5RDP/html5rdp.py +++ b/server/src/uds/transports/HTML5RDP/html5rdp.py @@ -264,6 +264,6 @@ class HTML5RDPTransport(transports.Transport): self.guacamoleServer.value, ticket, scrambler, - 'javascript:window.close();' + onw + onw ) ) diff --git a/server/src/uds/transports/HTML5VNC/html5vnc.py b/server/src/uds/transports/HTML5VNC/html5vnc.py index 8137ba68e..b3059fea0 100644 --- a/server/src/uds/transports/HTML5VNC/html5vnc.py +++ b/server/src/uds/transports/HTML5VNC/html5vnc.py @@ -191,6 +191,6 @@ class HTML5VNCTransport(transports.Transport): self.guacamoleServer.value, ticket, scrambler, - 'javascript:window.close();' + onw + onw ) )