]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
initscripts: functions: Permit ! in the value of key/value files
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 19 Jan 2026 16:21:39 +0000 (16:21 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 23 Jan 2026 09:47:38 +0000 (09:47 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/initscripts/system/functions

index 757912eabd3d05cd606c869a66110ec9618d132a..c0c40e986f62a542a967d8bc2e5dd32b69349585 100644 (file)
@@ -923,7 +923,7 @@ readhash() {
                local val="${line#*=}"
 
                # Skip lines with invalid values
-               if ! [[ ${val} =~ ^[\'][\ A-Za-z0-9=/,.:%_@#+-]*[\']$ ]] && ! [[ ${val} =~ ^[A-Za-z0-9=/,.:%_@#+-]*$ ]]; then
+               if ! [[ ${val} =~ ^[\'][\ A-Za-z0-9=/,.:%_@#+-\\!]*[\']$ ]] && ! [[ ${val} =~ ^[A-Za-z0-9=/,.:%_@#+-\\!]*$ ]]; then
                        echo "Invalid value '${val}' for key '${key}'" >&2
                        continue
                fi