Merge pull request #4225 from krisztian-kovacs-balabit/use-redirection-pdu-password-on-reconnect

core/connection: use redirection password when reconnecting
This commit is contained in:
akallabeth 2017-11-10 09:32:39 +01:00 committed by GitHub
commit fcc9419922
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -366,6 +366,22 @@ BOOL rdp_client_redirect(rdpRdp* rdp)
return FALSE;
}
if (settings->RedirectionFlags & LB_PASSWORD)
{
char *password = NULL;
/* If unicode conversion fails, this might be because the Password field
* might contain a non-unicode cookie value. Simply ignore in this case. */
if (ConvertFromUnicode(CP_UTF8, 0,
(WCHAR*) settings->RedirectionPassword, settings->RedirectionPasswordLength,
&password, 0,
NULL, NULL) > 0)
{
free(settings->Password);
settings->Password = password;
}
}
status = rdp_client_connect(rdp);
return status;