Changed password config regex
The password regex searches for password assignments, extracts the password and replaces it with a dummy value to prevent it being logged. This change adjusts the password regex to no longer accept trailing characters behind the password string
This commit is contained in:
parent
ae905b3baf
commit
2af841acdb
1 changed files with 1 additions and 1 deletions
|
@ -1614,7 +1614,7 @@ sub _read_config {
|
||||||
$content .= "$_\n" unless /^#/;
|
$content .= "$_\n" unless /^#/;
|
||||||
|
|
||||||
## parsing passwords is special
|
## parsing passwords is special
|
||||||
if (/^([^#]*\s)?([^#]*?password\S*?)\s*=\s*('.*'|[^']\S*)(.*)/) {
|
if (/^([^#]*\s)?([^#]*?password)\s*=\s*('.*'|[^']\S*)(.*)/) {
|
||||||
my ($head, $key, $value, $tail) = ($1 // '', $2, $3, $4);
|
my ($head, $key, $value, $tail) = ($1 // '', $2, $3, $4);
|
||||||
$value = $1 if $value =~ /^'(.*)'$/;
|
$value = $1 if $value =~ /^'(.*)'$/;
|
||||||
$passwords{$key} = $value;
|
$passwords{$key} = $value;
|
||||||
|
|
Loading…
Reference in a new issue