Skip to content

Commit 22e48dd

Browse files
committed
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`). xrdp_sec.c: reformat code to make astyle happy
1 parent fafd7bf commit 22e48dd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libxrdp/xrdp_sec.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,18 +1007,18 @@ xrdp_sec_process_logon_info(struct xrdp_sec *self, struct stream *s)
10071007
return 1;
10081008
}
10091009
}
1010-
else if (self->rdp_layer->client_info.enable_token_login
1011-
&& len_user > 0
1012-
&& len_password == 0
1013-
&& (sep = g_strchr(self->rdp_layer->client_info.username, '\x1f')) != NULL)
1010+
if (self->rdp_layer->client_info.enable_token_login
1011+
&& len_user > 0
1012+
&& len_password == 0
1013+
&& (sep = g_strchr(self->rdp_layer->client_info.username, '\x1f')) != NULL)
10141014
{
10151015
LOG(LOG_LEVEL_DEBUG, "Client supplied a Logon token. Overwriting password with logon token.");
10161016
g_strncpy(self->rdp_layer->client_info.password, sep + 1,
10171017
sizeof(self->rdp_layer->client_info.password) - 1);
10181018
self->rdp_layer->client_info.username[sep - self->rdp_layer->client_info.username] = '\0';
10191019
self->rdp_layer->client_info.rdp_autologin = 1;
10201020
}
1021-
else
1021+
else if (!(flags & RDP_LOGON_AUTO))
10221022
{
10231023
if (!s_check_rem_and_log(s, len_password + 2, "Parsing [MS-RDPBCGR] TS_INFO_PACKET Password"))
10241024
{

0 commit comments

Comments
 (0)