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>
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
\'*\')