]> git.plutz.net Git - busy/blobdiff - actions/introedit.sh
upgraded to fit new shcgi revision, slightly better input validation, switched to...
[busy] / actions / introedit.sh
index d629a1642071ababd4625d77f0341633c6a94620..3c6e69843220b896124f309eeba846c2a1cb09e4 100755 (executable)
@@ -16,7 +16,7 @@
 # along with Busy.  If not, see <http://www.gnu.org/licenses/>.
 
 
-info="$(echo -E "$_GET[\"i\"]" |grep -Ex 'intro|news|[0-9]{10}_[0-9]{3}')"
+info="$(printf %s\\n "${_GET[i]}" |grep -Ex 'intro|news|[0-9]{10}_[0-9]{3}')"
 
 case "$info" in
   news)
@@ -39,6 +39,6 @@ esac
 
 cgi_post
 
-[ -z "$_POST[\"cancel\"]" ] && echo -E "$_POST[\"text\"]" >"$_DATA/Home/${file}"
+[ -z "${_POST[cancel]}" ] && echo -E "${_POST[text]}" >"$_DATA/Home/${file}"
 
 echo -n "Location: ${HTTP_REFERER}#news_${info}\n\n"