From a7b85e045dcd2bb9f393d5890ffc4c046d5708e9 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Tue, 18 Mar 2008 22:09:21 +0000 Subject: [PATCH] - Don't allow colons in token names. - Let get_final_results() quote the URL. --- tools/privoxy-regression-test.pl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/privoxy-regression-test.pl b/tools/privoxy-regression-test.pl index 0e73498d..277d4333 100755 --- a/tools/privoxy-regression-test.pl +++ b/tools/privoxy-regression-test.pl @@ -7,7 +7,7 @@ # A regression test "framework" for Privoxy. For documentation see: # perldoc privoxy-regression-test.pl # -# $Id: privoxy-regression-test.pl,v 1.114 2008/03/18 16:52:09 fk Exp $ +# $Id: privoxy-regression-test.pl,v 1.115 2008/03/18 22:07:34 fk Exp $ # # Wish list: # @@ -213,7 +213,7 @@ sub tokenize ($) { s@"@"@g; # Tokenize - if (/^\#\s*([^=]*?)\s*[=]\s*(.*?)\s*$/) { + if (/^\#\s*([^=:]*?)\s*[=]\s*(.*?)\s*$/) { $token = $1; $token =~ tr/[A-Z]/[a-z]/; @@ -652,7 +652,10 @@ sub get_final_results ($) { my %final_results = (); my $final_results_reached = 0; - $curl_parameters .= PRIVOXY_CGI_URL . 'show-url-info?url=' . $url; + die "Unacceptable characterss in $url" if $url =~ m@[\\'"]@; + $url =~ s@\s@%20@g; + + $curl_parameters .= "'" . PRIVOXY_CGI_URL . 'show-url-info?url=' . $url . "'"; foreach (@{get_cgi_page_or_else($curl_parameters)}) { -- 2.39.2