Skip to content

Commit d83714a

Browse files
committed
Do not log LDAP bindpw or tls_keypw to debug log.
Found by the ZeroPath AI Security Engineer <https://zeropath.com>
1 parent a24c736 commit d83714a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/sudoers/ldap_conf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ sudo_ldap_decode_secret(const char *secret)
338338
}
339339
}
340340
}
341-
debug_return_str((char *)result);
341+
debug_return_str_masked((char *)result);
342342
}
343343

344344
static void
@@ -637,7 +637,7 @@ sudo_ldap_read_config(const struct sudoers_context *ctx)
637637
DPRINTF1("binddn %s",
638638
ldap_conf.binddn ? ldap_conf.binddn : "(anonymous)");
639639
DPRINTF1("bindpw %s",
640-
ldap_conf.bindpw ? ldap_conf.bindpw : "(anonymous)");
640+
ldap_conf.bindpw ? "********" : "(anonymous)");
641641
if (ldap_conf.bind_timelimit > 0) {
642642
DPRINTF1("bind_timelimit %d", ldap_conf.bind_timelimit);
643643
}

0 commit comments

Comments
 (0)