diff --git a/server/src/uds/transports/HTML5RDP/html5rdp.py b/server/src/uds/transports/HTML5RDP/html5rdp.py index e745165f7..63f21d405 100644 --- a/server/src/uds/transports/HTML5RDP/html5rdp.py +++ b/server/src/uds/transports/HTML5RDP/html5rdp.py @@ -417,8 +417,8 @@ class HTML5RDPTransport(transports.Transport): creds_info.domain, ) - scrambler = CryptoManager().random_string(32) - crypted_password = CryptoManager().symmetric_encrypt(password, scrambler) + scrambler = CryptoManager.manager().random_string(32) + crypted_password = CryptoManager.manager().symmetric_encrypt(password, scrambler) def as_txt(txt: typing.Any) -> str: return 'true' if txt else 'false' @@ -498,13 +498,16 @@ class HTML5RDPTransport(transports.Transport): if self.smooth.as_bool(): params['enable-font-smoothing'] = 'true' - # if support_params is not empty, add it to the params - # a comma separated list of key=value pairs - if self.support_params.value.strip(): - for param in self.support_params.value.split(','): - if '=' in param: - key, value = param.split('=', 1) - params[key.strip()] = value.strip() + # add support params that is a comma separated list of key=value pairs + # ignore empty values or values without '=' + params.update( + { + key.strip(): value.strip() + for key, value in ( + param.split('=', 1) for param in self.support_params.value.split(',') if '=' in param + ) + } + ) logger.debug('RDP Params: %s', params)