]> git.plutz.net Git - confetti/blobdiff - index.cgi
no escapes in debug function
[confetti] / index.cgi
index f0127826c0eb8f7210d5b7a9d54a0f19e91ca632..90ded2d30b79bef9c9f0882106121eb6420c949f 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -7,7 +7,8 @@ die() {
 }
 debug() { #change to false to disable debugging
   #true && echo "$*" >>debug
-  true && echo "$*" >>/dev/stderr
+  true && [ -n "$*" ] && echo -E "$*" >>/dev/stderr
+  true && [ -z "$*" ] && tee /dev/stderr
 }
 
 # this program is supposed to be symlinked into a http root directory