From db462b871493f63fac94a9724ee844269d5cf013 Mon Sep 17 00:00:00 2001 From: Manuel Penschuck Date: Mon, 16 Feb 2015 15:44:57 +0100 Subject: [PATCH] Decode escaped characters in query string --- web/htdocs/cts/cts.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/htdocs/cts/cts.pl b/web/htdocs/cts/cts.pl index 23872df..9f35dff 100755 --- a/web/htdocs/cts/cts.pl +++ b/web/htdocs/cts/cts.pl @@ -104,6 +104,12 @@ my $cts = connectToCTS( ); my $query = $ENV{'QUERY_STRING'}; +# escape sequences +while($query =~ /%([0-9a-fA-F]{2,2})/) { + my $chr = chr(hex($1)); + $query=~ s/%$1/$chr/g; +} + if ($query eq "init") { printHeader; print JSON_BIND->new->allow_blessed->convert_blessed->encode({ -- 2.43.0