mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-01-26 12:25:54 -05:00
improve character whitelisting
This commit is contained in:
parent
8f14e808a9
commit
66bcba8313
@ -36,12 +36,18 @@ add_statoverride_entry() {
|
||||
|
||||
set_file_perms() {
|
||||
while read -r line; do
|
||||
if [[ "$line" =~ ^#.*$ ]]; then
|
||||
echo "ERROR: cannot parse line with invalid character: ${line}" >&2
|
||||
if [ "$line" = "" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ "${line}" = "" ]; then
|
||||
if [[ "$line" =~ ^# ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ "$line" =~ [0-9a-zA-Z/] ]]; then
|
||||
true OK
|
||||
else
|
||||
echo "ERROR: cannot parse line with invalid character: ${line}" >&2
|
||||
continue
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user