Merge pull request #1872 from metalefty/neutrinordp-log

neutrinordp: avoid pampassword leakage
This commit is contained in:
metalefty 2021-04-30 00:47:14 +09:00 committed by GitHub
commit 261d8e575a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -443,7 +443,15 @@ lxrdp_set_param(struct mod *mod, const char *name, const char *value)
{ {
rdpSettings *settings; rdpSettings *settings;
LOG_DEVEL(LOG_LEVEL_DEBUG, "lxrdp_set_param: name [%s] value [%s]", name, value); if (g_strcmp(name, "password") == 0 || g_strcmp(name, "pampassword") == 0)
{
LOG_DEVEL(LOG_LEVEL_DEBUG, "lxrdp_set_param: name [%s] value [******]", name);
}
else
{
LOG_DEVEL(LOG_LEVEL_DEBUG, "lxrdp_set_param: name [%s] value [%s]", name, value);
}
settings = mod->inst->settings; settings = mod->inst->settings;
if (g_strcmp(name, "hostname") == 0) if (g_strcmp(name, "hostname") == 0)
@ -496,6 +504,12 @@ lxrdp_set_param(struct mod *mod, const char *name, const char *value)
{ {
settings->desktop_resize = g_text2bool(value); settings->desktop_resize = g_text2bool(value);
} }
else if (g_strcmp(name, "pamusername") == 0 ||
g_strcmp(name, "pampassword") == 0 ||
g_strcmp(name, "pammsessionmng") == 0)
{
/* Valid (but unused) parameters not logged */
}
else else
{ {
LOG(LOG_LEVEL_WARNING, "lxrdp_set_param: unknown name [%s] value [%s]", name, value); LOG(LOG_LEVEL_WARNING, "lxrdp_set_param: unknown name [%s] value [%s]", name, value);