From b67771d5f33f9c5383d353626f22f816b11149ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Tue, 2 Nov 2021 11:56:21 +0100 Subject: [PATCH] Fixed HTMLRDP parameters --- server/src/uds/transports/HTML5RDP/html5rdp.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/server/src/uds/transports/HTML5RDP/html5rdp.py b/server/src/uds/transports/HTML5RDP/html5rdp.py index 4d50aeb2..cf2d31fe 100644 --- a/server/src/uds/transports/HTML5RDP/html5rdp.py +++ b/server/src/uds/transports/HTML5RDP/html5rdp.py @@ -422,6 +422,8 @@ class HTML5RDPTransport(transports.Transport): scrambler = cryptoManager().randomString(32) passwordCrypted = cryptoManager().symCrypt(password, scrambler) + as_txt = lambda x: 'true' if x else 'false' + # Build params dict params = { 'protocol': 'rdp', @@ -432,11 +434,12 @@ class HTML5RDPTransport(transports.Transport): 'resize-method': 'display-update', 'ignore-cert': 'true', 'security': self.security.value, - 'enable-drive': self.enableFileSharing.value in ('true', 'down', 'up'), - 'disable-upload': self.enableFileSharing.value in ('true', 'up'), + 'enable-drive': as_txt(self.enableFileSharing.value in ('true', 'down', 'up')), + 'disable-upload': as_txt(self.enableFileSharing.value not in ('true', 'up')), 'drive-path': '/share/{}'.format(user.uuid), - 'disable-copy': self.enableClipboard.value in ('dis-copy', 'disabled'), - 'disable-paste': self.enableClipboard.value in ('dis-paste', 'disabled'), + 'drive-name': 'UDSfs', + 'disable-copy': as_txt(self.enableClipboard.value in ('dis-copy', 'disabled')), + 'disable-paste': as_txt(self.enableClipboard.value in ('dis-paste', 'disabled')), 'create-drive-path': 'true', 'ticket-info': { 'userService': userService.uuid,