mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-11-23 18:03:30 +08:00
Merge pull request #2040 from dpoe/stable-1.1
handle user@corp.net username correctly
This commit is contained in:
commit
6fc97c7179
@ -706,21 +706,12 @@ int freerdp_parse_username(char* username, char** user, char** domain)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
p = strchr(username, '@');
|
/* Do not break up the name for '@'; both credSSP and the
|
||||||
|
* ClientInfo PDU expect 'user@corp.net' to be transmitted
|
||||||
if (p)
|
* as username 'user@corp.net', domain empty.
|
||||||
{
|
*/
|
||||||
length = p - username;
|
*user = _strdup(username);
|
||||||
*user = (char*) malloc(length + 1);
|
*domain = NULL;
|
||||||
strncpy(*user, username, length);
|
|
||||||
(*user)[length] = '\0';
|
|
||||||
*domain = _strdup(&p[1]);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
*user = _strdup(username);
|
|
||||||
*domain = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user