Redact login and password when printing out internal hash values
This commit is contained in:
parent
3730ff54be
commit
94d34fe4e9
1 changed files with 6 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue