From: Paul Hänsch Date: Mon, 12 Nov 2018 01:38:08 +0000 (+0100) Subject: bugfix: allow GET/POST values starting with - (dash) X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=2509a90ca35ffada128256670abf1d5c315ef6ce;p=clickslide bugfix: allow GET/POST values starting with - (dash) --- diff --git a/cgilite.sh b/cgilite.sh index e0d4b93..3212137 100755 --- a/cgilite.sh +++ b/cgilite.sh @@ -49,7 +49,7 @@ HEX_DECODE=' ' HEX_DECODE(){ - printf "$(printf %s "$1" |sed -r "$HEX_DECODE")" + printf -- "$(printf %s "$1" |sed -r "$HEX_DECODE")" } if [ -z "$REQUEST_METHOD" ]; then @@ -116,7 +116,7 @@ cgilite_value(){ str=${str#*&${name}=} cnt=$((cnt - 1)) done - printf "$(printf %s "${str%%&*}" |sed -r 's;\+; ;g;'"$HEX_DECODE")" + printf -- "$(printf %s "${str%%&*}" |sed -r 's;\+; ;g;'"$HEX_DECODE")" } GET(){ cgilite_value "${QUERY_STRING}" $@; }