]> git.plutz.net Git - cgilite/blobdiff - cgilite.sh
fix: PATH function removed all directory parts shorter than two characters (pattern...
[cgilite] / cgilite.sh
index 13cdb3cdc347f35ffd507a2d4fcd9c1dc6f5a2e0..b936e47dbe07457833b724fbeadbac12a5bceaf7 100755 (executable)
@@ -177,9 +177,9 @@ PATH(){
   printf %s "$1" \
   | sed -r 's;^.*$;/&/;; s;/+;/;g;
             :X;
-            s;^/../;/;; s;/./;/;g;
+            s;^/\.\./;/;; s;/\./;/;g;
             tX;
-            s;/[^/]+/../;/;;
+            s;/[^/]+/\.\./;/;;
             tX;
             s;^(/.*)/$;\1;'
 }
@@ -200,7 +200,7 @@ SET_COOKIE(){
 }
 
 REDIRECT(){
-  printf '%s: %s\r\n'
+  printf '%s: %s\r\n' \
     Status "303 See Other" \
     Content-Length 0 \
     Location "$*"