diff options
| author | erdgeist <> | 2013-09-27 18:42:45 +0000 |
|---|---|---|
| committer | erdgeist <> | 2013-09-27 18:42:45 +0000 |
| commit | bb382c630ad4db6f83c8371981e705008684dd40 (patch) | |
| tree | f9eef666ef5fc0f22f0f5e4ccc95e8d9cd7fd938 | |
| parent | d28ba289468b13f205830dfffc1ac06bf49f8ecd (diff) | |
Be more strict about what to allow in a request
| -rwxr-xr-x | minimunin | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -18,8 +18,8 @@ main() { | |||
| 18 | while read command arg; do | 18 | while read command arg; do |
| 19 | 19 | ||
| 20 | # chomp | 20 | # chomp |
| 21 | command=`printf %s "${command}" | /usr/bin/tr -d '\r'` | 21 | command=`printf %s "${command}" | /usr/bin/tr -cd '[:alnum:]_-. '` |
| 22 | arg=`printf %s "${arg}" | /usr/bin/tr -d '\r'` | 22 | arg=`printf %s "${arg}" | /usr/bin/tr -cd '[:alnum:]_-. '` |
| 23 | 23 | ||
| 24 | # printf "%s %s\n" "$command" "$arg" >> /var/log/minimunin.log | 24 | # printf "%s %s\n" "$command" "$arg" >> /var/log/minimunin.log |
| 25 | # dispatch commands | 25 | # dispatch commands |
