From 59df6f07694a3c44b05e7ce06d27fc2e168f06df Mon Sep 17 00:00:00 2001 From: Alexander Georgievskiy Date: Thu, 13 Oct 2022 16:33:24 +0300 Subject: [PATCH] xrdp_sec.c: add token login for autologon clients Make `token login` available for clients with `RDP_LOGON_AUTO` flag, such as `mstsc.exe` `6.2.22000.282` (`Win11` `22621.608`). --- libxrdp/xrdp_sec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c index a5f3bd4a3a..90e32cfd8c 100644 --- a/libxrdp/xrdp_sec.c +++ b/libxrdp/xrdp_sec.c @@ -1007,7 +1007,7 @@ xrdp_sec_process_logon_info(struct xrdp_sec *self, struct stream *s) return 1; } } - else if (self->rdp_layer->client_info.enable_token_login + if (self->rdp_layer->client_info.enable_token_login && len_user > 0 && len_password == 0 && (sep = g_strchr(self->rdp_layer->client_info.username, '\x1f')) != NULL) @@ -1018,7 +1018,7 @@ xrdp_sec_process_logon_info(struct xrdp_sec *self, struct stream *s) self->rdp_layer->client_info.username[sep - self->rdp_layer->client_info.username] = '\0'; self->rdp_layer->client_info.rdp_autologin = 1; } - else + else if (!(flags & RDP_LOGON_AUTO)) { if (!s_check_rem_and_log(s, len_password + 2, "Parsing [MS-RDPBCGR] TS_INFO_PACKET Password")) {