1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-01-10 01:17:59 +03:00

Fixed spice upgrades

This commit is contained in:
Adolfo Gómez García 2023-02-14 14:41:56 +01:00
parent d2d13d1089
commit c8df5de095
No known key found for this signature in database
GPG Key ID: DD1ABF20724CDA23
2 changed files with 10 additions and 6 deletions

View File

@ -65,6 +65,7 @@ class SPICETransport(BaseSpiceTransport):
autoNewUsbShare = BaseSpiceTransport.autoNewUsbShare
smartCardRedirect = BaseSpiceTransport.smartCardRedirect
sslConnection = BaseSpiceTransport.SSLConnection
overridedProxy = BaseSpiceTransport.overridedProxy
def getUDSTransportScript(
self,
@ -93,7 +94,7 @@ class SPICETransport(BaseSpiceTransport):
port,
secure_port,
con['ticket']['value'],
self.serverCertificate.value.strip() or con.get('ca', ''),
con.get('ca', self.serverCertificate.value.strip()),
con['cert_subject'],
fullscreen=self.fullScreen.isTrue(),
)

View File

@ -100,6 +100,7 @@ class TSPICETransport(BaseSpiceTransport):
autoNewUsbShare = BaseSpiceTransport.autoNewUsbShare
smartCardRedirect = BaseSpiceTransport.smartCardRedirect
sslConnection = BaseSpiceTransport.SSLConnection
overridedProxy = BaseSpiceTransport.overridedProxy
def initialize(self, values: 'Module.ValuesType'):
if values:
@ -118,11 +119,13 @@ class TSPICETransport(BaseSpiceTransport):
password: str,
request: 'HttpRequest',
) -> typing.Tuple[str, str, typing.Mapping[str, typing.Any]]:
userServiceInstance: typing.Any = userService.getInstance()
# Spice connection
con = userServiceInstance.getConsoleConnection()
try:
userServiceInstance: typing.Any = userService.getInstance()
con = userServiceInstance.getConsoleConnection()
except Exception:
logger.exception('Error getting console connection data')
raise
tunHost, tunPort = self.tunnelServer.value.split(':')
# We MAY need two tickets, one for 'insecure' port an one for secure