diff --git a/command_watcher.sh b/command_watcher.sh index 068db1e..230f20c 100755 --- a/command_watcher.sh +++ b/command_watcher.sh @@ -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