httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 31679] - If the argument of a CGI has two or more consecutive plus signs (+) it gets truncated.
Date Wed, 13 Oct 2004 00:32:15 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31679>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31679

If the argument of a CGI has two or more consecutive plus signs (+) it gets truncated.





------- Additional Comments From erik@xinet.com  2004-10-13 00:32 -------
The perl version of printenv that comes with Windows Apache 2 only reads 
environment variables (which have no problems). It doesn't read arguments. So, 
I added code to that script to display the arguments passed. This is my 
resulting perl script that I used to test:

#!c:/Perl/bin/Perl.exe
##
##  printenv -- demo CGI program which just prints its environment
##

print "Content-type: text/plain\n\n";
foreach $var (sort(keys(%ENV))) {
    $val = $ENV{$var};
    $val =~ s|\n|\\n|g;
    $val =~ s|"|\\"|g;
    print "${var}=\"${val}\"\n";
}

$first_arg = shift @ARGV;
print "arg[0] = ", $first_arg, "\n";
$second_arg = shift @ARGV;
print "arg[1] = ", $second_arg, "\n";
$third_arg = shift @ARGV;
print "arg[2] = ", $third_arg, "\n";
$fourth_arg = shift @ARGV;
print "arg[3] = ", $fourth_arg, "\n";

If you do:
http://131.106.1.74/cgi-bin/printenv.pl?argument1+ignored1+ignored2+ignored3

You will see all 4 arguments after the env variables with no problems.

If you do:
http://131.106.1.74/cgi-bin/printenv.pl?argument1++ignored1+ignored2+ignored3

You only see the first one.

Let me know if you need more information.

Thanks,

--Erik Zapien

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message