From 2509a90ca35ffada128256670abf1d5c315ef6ce Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Mon, 12 Nov 2018 02:38:08 +0100 Subject: [PATCH] bugfix: allow GET/POST values starting with - (dash) --- cgilite.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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}" $@; } -- 2.39.2