From 2af841acdb8b6fd86d83e7ba926800df5ffc0092 Mon Sep 17 00:00:00 2001 From: Lenard Hess Date: Sun, 26 Feb 2023 18:54:19 +0100 Subject: [PATCH] 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 --- ddclient.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddclient.in b/ddclient.in index f6487e6..776e5d0 100755 --- a/ddclient.in +++ b/ddclient.in @@ -1614,7 +1614,7 @@ sub _read_config { $content .= "$_\n" unless /^#/; ## 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); $value = $1 if $value =~ /^'(.*)'$/; $passwords{$key} = $value;