Redact login and password when printing out internal hash values

This commit is contained in:
David Kerr 2020-08-08 21:14:15 -04:00
parent 3730ff54be
commit 94d34fe4e9

View file

@ -1649,7 +1649,12 @@ sub _print_hash {
$value = "<undefined>";
} elsif (ref $ptr eq 'HASH') {
foreach my $key (sort keys %$ptr) {
_print_hash("${string}\{$key\}", $ptr->{$key});
if (($key eq "login") || ($key eq "password")) {
$value = "<redacted>";
} else {
$value = $ptr->{$key};
}
_print_hash("${string}\{$key\}", $value);
}
return;
}