Make username and password case insensitive on more places
This commit is contained in:
parent
ce23c824ea
commit
3f5327542f
@ -438,7 +438,7 @@ xrdp_wm_show_edits(struct xrdp_wm *self, struct xrdp_bitmap *combo)
|
|||||||
|
|
||||||
/* Use the domain name as the destination IP/DNS
|
/* Use the domain name as the destination IP/DNS
|
||||||
This is useful in a gateway setup. */
|
This is useful in a gateway setup. */
|
||||||
if (g_strncmp(name, "ip", 255) == 0)
|
if (g_strncasecmp(name, "ip", 255) == 0)
|
||||||
{
|
{
|
||||||
/* If the first char in the domain name is '_' we use the
|
/* If the first char in the domain name is '_' we use the
|
||||||
domain name as IP */
|
domain name as IP */
|
||||||
@ -453,7 +453,7 @@ xrdp_wm_show_edits(struct xrdp_wm *self, struct xrdp_bitmap *combo)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_strncmp(name, "username", 255) == 0 &&
|
if (g_strncasecmp(name, "username", 255) == 0 &&
|
||||||
self->session->client_info->username[0])
|
self->session->client_info->username[0])
|
||||||
{
|
{
|
||||||
g_strncpy(b->caption1, self->session->client_info->username, 255);
|
g_strncpy(b->caption1, self->session->client_info->username, 255);
|
||||||
@ -465,7 +465,8 @@ xrdp_wm_show_edits(struct xrdp_wm *self, struct xrdp_bitmap *combo)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((g_strncmp(name, "password", 255) == 0) || (g_strncmp(name, "pampassword", 255) == 0))
|
if ((g_strncasecmp(name, "password", 255) == 0) ||
|
||||||
|
(g_strncasecmp(name, "pampassword", 255) == 0))
|
||||||
{
|
{
|
||||||
b->password_char = '*';
|
b->password_char = '*';
|
||||||
|
|
||||||
|
@ -704,7 +704,7 @@ xrdp_wm_init(struct xrdp_wm *self)
|
|||||||
q = (char *)list_get_item(names, index);
|
q = (char *)list_get_item(names, index);
|
||||||
r = (char *)list_get_item(values, index);
|
r = (char *)list_get_item(values, index);
|
||||||
|
|
||||||
if (g_strncmp("password", q, 255) == 0)
|
if (g_strncasecmp("password", q, 255) == 0)
|
||||||
{
|
{
|
||||||
/* if the password has been asked for by the module, use what the
|
/* if the password has been asked for by the module, use what the
|
||||||
client says.
|
client says.
|
||||||
@ -715,7 +715,7 @@ xrdp_wm_init(struct xrdp_wm *self)
|
|||||||
r = self->session->client_info->password;
|
r = self->session->client_info->password;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (g_strncmp("username", q, 255) == 0)
|
else if (g_strncasecmp("username", q, 255) == 0)
|
||||||
{
|
{
|
||||||
/* if the username has been asked for by the module, use what the
|
/* if the username has been asked for by the module, use what the
|
||||||
client says.
|
client says.
|
||||||
@ -726,7 +726,7 @@ xrdp_wm_init(struct xrdp_wm *self)
|
|||||||
r = self->session->client_info->username;
|
r = self->session->client_info->username;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (g_strncmp("ip", q, 255) == 0)
|
else if (g_strncasecmp("ip", q, 255) == 0)
|
||||||
{
|
{
|
||||||
/* if the ip has been asked for by the module, use what the
|
/* if the ip has been asked for by the module, use what the
|
||||||
client says (target ip should be in 'domain' field, when starting with "_")
|
client says (target ip should be in 'domain' field, when starting with "_")
|
||||||
@ -742,7 +742,7 @@ xrdp_wm_init(struct xrdp_wm *self)
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (g_strncmp("port", q, 255) == 0)
|
else if (g_strncasecmp("port", q, 255) == 0)
|
||||||
{
|
{
|
||||||
if (g_strncmp("ask3389", r, 7) == 0)
|
if (g_strncmp("ask3389", r, 7) == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user