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.
This commit is contained in:
Michael Tremer
2012-01-23 22:09:31 +01:00
parent 76b8277500
commit e247eb7cec
2 changed files with 2 additions and 1 deletions

View File

@@ -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

View File

@@ -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