From 81b16464588191886a85a80ed6c123c52ebd1be4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez?= Date: Mon, 2 Sep 2013 10:45:21 +0000 Subject: [PATCH] Back to work :-) * Fixed Domain part of credentials for HTML5RDP * Fixed Domain part of credentials for RDP * Fixed Domain part of credentials for Tunneler RDP --- server/src/uds/transports/HTML5RDP/HTML5RDP.py | 7 ++++--- server/src/uds/transports/RDP/RDPTransport.py | 6 ++++++ server/src/uds/transports/RDP/TSRDPTransport.py | 5 +++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/server/src/uds/transports/HTML5RDP/HTML5RDP.py b/server/src/uds/transports/HTML5RDP/HTML5RDP.py index 4dd2fd0fc..564c08bfb 100644 --- a/server/src/uds/transports/HTML5RDP/HTML5RDP.py +++ b/server/src/uds/transports/HTML5RDP/HTML5RDP.py @@ -94,9 +94,9 @@ class HTML5RDPTransport(Transport): domain = '' if username.find('@') != -1: - domain = username[username.find('@')+1:] + username, domain = username.split('@') elif username.find('\\') != -1: - domain = username[:username.find('\\')] + domain, username = username.split('\\') if self.fixedName.value is not '': username = self.fixedName.value @@ -114,8 +114,9 @@ class HTML5RDPTransport(Transport): if domain.find('.') == -1: username = domain + '\\' + username else: - username = username + '@' + username + username = username + '@' + domain + # Build params dict params = { 'protocol':'rdp', 'hostname':ip, 'username': username, 'password': password } diff --git a/server/src/uds/transports/RDP/RDPTransport.py b/server/src/uds/transports/RDP/RDPTransport.py index da4d7eed3..c6ddf386a 100644 --- a/server/src/uds/transports/RDP/RDPTransport.py +++ b/server/src/uds/transports/RDP/RDPTransport.py @@ -163,6 +163,7 @@ class RDPTransport(Transport): else: domain = '' username = proc[0] + if self._fixedName is not '': username = self._fixedName if self._fixedPassword is not '': @@ -171,6 +172,11 @@ class RDPTransport(Transport): domain = self._fixedDomain; if self._useEmptyCreds is True: username, password, domain = '','','' + + if domain != '': + if domain.find('.') == -1: # Dotter domain form + username = username + '@' + domain + domain = '' width, height = CommonPrefs.getWidthHeight(prefs) depth = CommonPrefs.getDepth(prefs) diff --git a/server/src/uds/transports/RDP/TSRDPTransport.py b/server/src/uds/transports/RDP/TSRDPTransport.py index 1e21bdbc8..fa18e9187 100644 --- a/server/src/uds/transports/RDP/TSRDPTransport.py +++ b/server/src/uds/transports/RDP/TSRDPTransport.py @@ -161,6 +161,11 @@ class TSRDPTransport(Transport): if self._useEmptyCreds is True: username, password, domain = '','','' + if domain != '': + if domain.find('.') == -1: # Dotter domain form + username = username + '@' + domain + domain = '' + width, height = CommonPrefs.getWidthHeight(prefs) depth = CommonPrefs.getDepth(prefs) cache = Cache('pam')