From bb382c630ad4db6f83c8371981e705008684dd40 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Fri, 27 Sep 2013 18:42:45 +0000 Subject: Be more strict about what to allow in a request --- minimunin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/minimunin b/minimunin index 9319f6b..a36372f 100755 --- a/minimunin +++ b/minimunin @@ -18,8 +18,8 @@ main() { while read command arg; do # chomp - command=`printf %s "${command}" | /usr/bin/tr -d '\r'` - arg=`printf %s "${arg}" | /usr/bin/tr -d '\r'` + command=`printf %s "${command}" | /usr/bin/tr -cd '[:alnum:]_-. '` + arg=`printf %s "${arg}" | /usr/bin/tr -cd '[:alnum:]_-. '` # printf "%s %s\n" "$command" "$arg" >> /var/log/minimunin.log # dispatch commands -- cgit v1.2.3