improved security

This commit is contained in:
root 2017-03-04 18:02:28 +00:00
parent 57d3c9e726
commit 45d4c0028e
1 changed files with 4 additions and 0 deletions

View File

@ -17,6 +17,10 @@ chmod 666 "$COMMAND_FILE"
while true; do
while IFS='' read -r line || [[ -n "$line" ]]; do
echo "command received: $line"
if echo "$line" | grep "!" >/dev/null; then # ! is used internally to execute shell commands!
echo "ERROR: illegal characters" >&2
continue
fi
case "$line" in
lounge_light_toggle)
lounge_light_toggle