From e247eb7cec0c628fb1d0a07e9cec3ced925b53d9 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 23 Jan 2012 22:09:31 +0100 Subject: [PATCH] Allow : character in configuration files. According to bug #10006, it is needed in some DSL credentials. As : is not a special character in shell code (at least if {} is not allowed either) we can safely use it. --- config/rootfiles/core/56/filelists/files | 1 + src/scripts/readhash | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/rootfiles/core/56/filelists/files b/config/rootfiles/core/56/filelists/files index 58c19601ee..7b1d4c0e82 100644 --- a/config/rootfiles/core/56/filelists/files +++ b/config/rootfiles/core/56/filelists/files @@ -8,3 +8,4 @@ srv/web/ipfire/cgi-bin/media.cgi usr/local/bin/hddshutdown usr/local/bin/makegraphs usr/local/bin/openvpnctrl +usr/local/bin/readhash diff --git a/src/scripts/readhash b/src/scripts/readhash index 63a3e0f88d..8c187d51d1 100644 --- a/src/scripts/readhash +++ b/src/scripts/readhash @@ -13,7 +13,7 @@ VARNAME='[A-Za-z_][A-zA-z0-9_]*' # For the assigned value we only accept a limited number of characters - none # of which are shell metachars -VARCHARS='A-Za-z0-9=/,._@#+-' +VARCHARS='A-Za-z0-9=/,.:_@#+-' VARVAL="[${VARCHARS}]*" sed -ne "s/\(${VARNAME}\)=\(${VARVAL}\)$/\1=\2/p" $1 -- 2.39.2