From 48aec5725602c9d4ed9051cb5e375b77aa783338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Tue, 25 Apr 2023 13:08:19 +0200 Subject: [PATCH] recovered "azuread" logging compat --- server/src/uds/transports/HTML5RDP/html5rdp.py | 9 +++++++++ server/src/uds/transports/RDP/rdp_base.py | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/server/src/uds/transports/HTML5RDP/html5rdp.py b/server/src/uds/transports/HTML5RDP/html5rdp.py index 3f9ae3071..294cb3468 100644 --- a/server/src/uds/transports/HTML5RDP/html5rdp.py +++ b/server/src/uds/transports/HTML5RDP/html5rdp.py @@ -380,6 +380,11 @@ class HTML5RDPTransport(transports.Transport): username = proc[0] azureAd = False + if self.fixedDomain.value != '': + if self.fixedDomain.value.lower() == 'azuread': + azureAd = True + else: + domain = self.fixedDomain.value if self.fixedDomain.value != '': domain = self.fixedDomain.value @@ -394,6 +399,10 @@ class HTML5RDPTransport(transports.Transport): username = username + '@' + domain domain = '' + # If AzureAD, include it on username + if azureAd: + username = 'AzureAD\\' + username + # Fix username/password acording to os manager username, password = userService.processUserPassword(username, password) diff --git a/server/src/uds/transports/RDP/rdp_base.py b/server/src/uds/transports/RDP/rdp_base.py index d85c5692c..eb28de4b8 100644 --- a/server/src/uds/transports/RDP/rdp_base.py +++ b/server/src/uds/transports/RDP/rdp_base.py @@ -418,6 +418,10 @@ class BaseRDPTransport(transports.Transport): if '\\' in username: domain, username = username.split('\\') + # If AzureAD, include it on username + if azureAd: + username = 'AzureAD\\' + username + return { 'protocol': self.protocol, 'username': username,