]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
initscripts: Don't perform value filtering in readhash
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 3 Feb 2026 10:15:51 +0000 (10:15 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 3 Feb 2026 10:15:51 +0000 (10:15 +0000)
Since we now have a safe way to parse values from the configuration
file, we should no longer require filtering any more. We will have to be
very careful with working with these values.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/initscripts/system/functions

index c0c40e986f62a542a967d8bc2e5dd32b69349585..52c3545e58cdd6079db0ddedc24a7f434d93007c 100644 (file)
@@ -922,12 +922,6 @@ readhash() {
                local key="${line%%=*}"
                local val="${line#*=}"
 
-               # Skip lines with invalid values
-               if ! [[ ${val} =~ ^[\'][\ A-Za-z0-9=/,.:%_@#+-\\!]*[\']$ ]] && ! [[ ${val} =~ ^[A-Za-z0-9=/,.:%_@#+-\\!]*$ ]]; then
-                       echo "Invalid value '${val}' for key '${key}'" >&2
-                       continue
-               fi
-
                # strip leading and trailing single quotes
                case "${val}" in
                        \'*\')