From 1fbc4b9bfdf3879bdb95b0e4ab541ba9c5b1b3d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Tue, 31 Jan 2023 14:18:27 +0100 Subject: [PATCH] Fixed & updated patch from @Future998 --- server/src/uds/transports/SPICE/remote_viewer_file.py | 3 +-- server/src/uds/transports/SPICE/spice.py | 2 +- server/src/uds/transports/SPICE/spice_base.py | 5 +++-- server/src/uds/transports/SPICE/spice_tunnel.py | 2 ++ 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/server/src/uds/transports/SPICE/remote_viewer_file.py b/server/src/uds/transports/SPICE/remote_viewer_file.py index 83ded5538..ce9445281 100644 --- a/server/src/uds/transports/SPICE/remote_viewer_file.py +++ b/server/src/uds/transports/SPICE/remote_viewer_file.py @@ -104,7 +104,6 @@ class RemoteViewerFile: delete_file = '01'[self.delete_file] usb_auto_share = '01'[self.usb_auto_share] new_usb_auto_share = '01'[self.new_usb_auto_share] - ssl_connection = '01'[self.ssl_connection] ca = self.ca.strip().replace( '\n', '\\n' @@ -127,7 +126,7 @@ class RemoteViewerFile: host_subject=self.host_subject if tls_port != '-1' else '', ca=ca if tls_port != '-1' else '', secure_channel='secure-channels=main;inputs;cursor;playback;record;display;usbredir;smartcard' - if ssl_connection and tls_port != '-1' + if self.ssl_connection and tls_port != '-1' else '', proxy=self.proxy, ) diff --git a/server/src/uds/transports/SPICE/spice.py b/server/src/uds/transports/SPICE/spice.py index a8f9a8cf3..c4ebd0177 100644 --- a/server/src/uds/transports/SPICE/spice.py +++ b/server/src/uds/transports/SPICE/spice.py @@ -101,7 +101,7 @@ class SPICETransport(BaseSpiceTransport): r.usb_auto_share = self.usbShare.isTrue() r.new_usb_auto_share = self.autoNewUsbShare.isTrue() r.smartcard = self.smartCardRedirect.isTrue() - r.ssl = self.sslConnection.isTrue() + r.ssl_connection = self.sslConnection.isTrue() osName = { OsDetector.KnownOS.Windows: 'windows', diff --git a/server/src/uds/transports/SPICE/spice_base.py b/server/src/uds/transports/SPICE/spice_base.py index 04810a9ef..7275c818c 100644 --- a/server/src/uds/transports/SPICE/spice_base.py +++ b/server/src/uds/transports/SPICE/spice_base.py @@ -116,8 +116,9 @@ class BaseSpiceTransport(transports.Transport): SSLConnection = gui.CheckBoxField( order=9, label=_('SSL Connection'), - tooltip=_('If checked, SPICE protocol will required SSL connection.'), - defvalue=gui.FALSE, + tooltip=_('If checked, SPICE protocol will allow SSL connections.'), + defvalue=gui.TRUE, + tab=gui.ADVANCED_TAB, ) def isAvailableFor(self, userService: 'models.UserService', ip: str) -> bool: diff --git a/server/src/uds/transports/SPICE/spice_tunnel.py b/server/src/uds/transports/SPICE/spice_tunnel.py index 89dfdc3b0..0416c6b56 100644 --- a/server/src/uds/transports/SPICE/spice_tunnel.py +++ b/server/src/uds/transports/SPICE/spice_tunnel.py @@ -99,6 +99,7 @@ class TSPICETransport(BaseSpiceTransport): usbShare = BaseSpiceTransport.usbShare autoNewUsbShare = BaseSpiceTransport.autoNewUsbShare smartCardRedirect = BaseSpiceTransport.smartCardRedirect + sslConnection = BaseSpiceTransport.SSLConnection def initialize(self, values: 'Module.ValuesType'): if values: @@ -176,6 +177,7 @@ class TSPICETransport(BaseSpiceTransport): r.usb_auto_share = self.usbShare.isTrue() r.new_usb_auto_share = self.autoNewUsbShare.isTrue() r.smartcard = self.smartCardRedirect.isTrue() + r.ssl_connection = self.sslConnection.isTrue() osName = { OsDetector.KnownOS.Windows: 'windows',