Fixed HTMLRDP parameters

This commit is contained in:
Adolfo Gómez García 2021-11-02 11:56:21 +01:00
parent 672c35c903
commit b67771d5f3

View File

@ -422,6 +422,8 @@ class HTML5RDPTransport(transports.Transport):
scrambler = cryptoManager().randomString(32) scrambler = cryptoManager().randomString(32)
passwordCrypted = cryptoManager().symCrypt(password, scrambler) passwordCrypted = cryptoManager().symCrypt(password, scrambler)
as_txt = lambda x: 'true' if x else 'false'
# Build params dict # Build params dict
params = { params = {
'protocol': 'rdp', 'protocol': 'rdp',
@ -432,11 +434,12 @@ class HTML5RDPTransport(transports.Transport):
'resize-method': 'display-update', 'resize-method': 'display-update',
'ignore-cert': 'true', 'ignore-cert': 'true',
'security': self.security.value, 'security': self.security.value,
'enable-drive': self.enableFileSharing.value in ('true', 'down', 'up'), 'enable-drive': as_txt(self.enableFileSharing.value in ('true', 'down', 'up')),
'disable-upload': self.enableFileSharing.value in ('true', 'up'), 'disable-upload': as_txt(self.enableFileSharing.value not in ('true', 'up')),
'drive-path': '/share/{}'.format(user.uuid), 'drive-path': '/share/{}'.format(user.uuid),
'disable-copy': self.enableClipboard.value in ('dis-copy', 'disabled'), 'drive-name': 'UDSfs',
'disable-paste': self.enableClipboard.value in ('dis-paste', 'disabled'), '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', 'create-drive-path': 'true',
'ticket-info': { 'ticket-info': {
'userService': userService.uuid, 'userService': userService.uuid,