X-Git-Url: http://git.plutz.net/?p=cgilite;a=blobdiff_plain;f=cgilite.sh;h=0c9582b658dd379b69c8bfecb2cfd4c18c623fdc;hp=6821a7a662e6cf6630af51691ae3816ca10959e4;hb=b1d4b7df6ead24f4c8e25797ae242287e73e9d59;hpb=d480b7cb55bbd085b361398bdc4903817de1709a diff --git a/cgilite.sh b/cgilite.sh index 6821a7a..0c9582b 100755 --- a/cgilite.sh +++ b/cgilite.sh @@ -177,15 +177,17 @@ PATH(){ printf %s "$1" \ | sed -r 's;^.*$;/&/;; s;/+;/;g; :X; - s;^/../;/;; s;/./;/;g; + s;^/\.\./;/;; s;/\./;/;g; tX; - s;/[^/]+/../;/;; + s;/[^/]+/\.\./;/;; tX; - s;^(/.*)/$;\1;' + s;^(/.*)/$;\1; + s;/+;/;g;' } SET_COOKIE(){ + local expire cookie case "$1" in ''|0|session) expire='';; [+-][0-9]*) expire="$(date -R -d @$(($(date +%s) + $1)))";;