# HG changeset patch # User HIROSE Yuuji # Date 1486982807 -32373 # Node ID f4ec6ac09b60de1cda5f74e7251ecff1d5fb02a9 # Parent 933df1a150e0ef00601b1c3aacdf476dd5a92044 Remove non numeric/comma chars at reference id detection for safety diff -r 933df1a150e0 -r f4ec6ac09b60 s4-blog.sh --- a/s4-blog.sh Mon Feb 13 19:37:33 2017 +0859 +++ b/s4-blog.sh Mon Feb 13 19:46:20 2017 +0859 @@ -63,7 +63,7 @@ if [ -z "$4" -a -n "$replymark" ]; then # If the action is new subscription($4="") and has ">#123" marks... ids=`echo "$replymark"|sed 's/[^#0-9]*#\([0-9]*\)[^#0-9]*/\1 /g'` - ids=`echo $ids|tr ' ' ','` + ids=`echo ${ids%%[!0-9,]*}|tr ' ' ','` # -> 123,345,347 unames=`query "SELECT distinct author FROM article \ WHERE rowid in ($ids)\