mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-12-16 12:33:59 -05:00
improve character whitelisting
This commit is contained in:
parent
8f14e808a9
commit
66bcba8313
1 changed files with 9 additions and 3 deletions
|
|
@ -36,12 +36,18 @@ add_statoverride_entry() {
|
||||||
|
|
||||||
set_file_perms() {
|
set_file_perms() {
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
if [[ "$line" =~ ^#.*$ ]]; then
|
if [ "$line" = "" ]; then
|
||||||
echo "ERROR: cannot parse line with invalid character: ${line}" >&2
|
|
||||||
continue
|
continue
|
||||||
fi
|
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
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue