From patchwork Mon Jan 19 16:21:39 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 9406 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail01.haj.ipfire.org", Issuer "R12" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4dvwhN6chXz3wjW for ; Mon, 19 Jan 2026 16:21:56 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail02.haj.ipfire.org", Issuer "E8" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4dvwhN5k8zz3v3 for ; Mon, 19 Jan 2026 16:21:56 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4dvwhN4WqBz2yZf for ; Mon, 19 Jan 2026 16:21:56 +0000 (UTC) X-Original-To: development@lists.ipfire.org Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail01.haj.ipfire.org", Issuer "R12" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4dvwhK69ZHz331X for ; Mon, 19 Jan 2026 16:21:53 +0000 (UTC) Received: from michael.haj.ipfire.org (michael.haj.ipfire.org [172.28.1.242]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "michael.haj.ipfire.org", Issuer "E8" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4dvwhK5BKkz440; Mon, 19 Jan 2026 16:21:53 +0000 (UTC) Received: by michael.haj.ipfire.org (Postfix, from userid 0) id 4dvwhD4CV3zTj6V; Mon, 19 Jan 2026 16:21:48 +0000 (UTC) From: Michael Tremer To: development@lists.ipfire.org Cc: Michael Tremer Subject: [PATCH 4/5] initscripts: functions: Permit ! in the value of key/value files Date: Mon, 19 Jan 2026 16:21:39 +0000 Message-ID: <20260119162140.3373757-4-michael.tremer@ipfire.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260119162140.3373757-1-michael.tremer@ipfire.org> References: <20260119162140.3373757-1-michael.tremer@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 Signed-off-by: Michael Tremer --- src/initscripts/system/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/initscripts/system/functions b/src/initscripts/system/functions index 757912eab..c0c40e986 100644 --- a/src/initscripts/system/functions +++ b/src/initscripts/system/functions @@ -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