You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by st...@apache.org on 2004/07/08 08:54:28 UTC
cvs commit: modperl-2.0/t/filter/TestFilter in_error.pm
stas 2004/07/07 23:54:28
Modified: t/filter/TestFilter in_error.pm
Log:
cause taint problems, as there was a bug (panic: POPSTACK)
caused when APR/Error.pm was attempted to be loaded from
$r->read() when the latter was trying to croak about the failed
read, due to the filter returning 500
Revision Changes Path
1.4 +7 -4 modperl-2.0/t/filter/TestFilter/in_error.pm
Index: in_error.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/TestFilter/in_error.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -u -r1.3 -r1.4
--- in_error.pm 31 Dec 2003 19:07:26 -0000 1.3
+++ in_error.pm 8 Jul 2004 06:54:28 -0000 1.4
@@ -23,7 +23,6 @@
debug join '', "-" x 20 , " filter called ", "-" x 20;
- t_server_log_error_is_expected();
die "This filter must die";
return Apache::OK;
@@ -32,10 +31,14 @@
sub response {
my $r = shift;
+ # cause taint problems, as there was a bug (panic: POPSTACK)
+ # caused when APR/Error.pm was attempted to be loaded from
+ # $r->read() when the latter was trying to croak about the failed
+ # read, due to the filter returning 500
+ eval { system('echo', 'hello') };
+
+ t_server_log_error_is_expected(2);
my $len = $r->read(my $data, $r->headers_in->{'Content-Length'});
- t_server_log_error_is_expected();
- die "failed to read POSTed data: $!" unless defined $len;
- debug "read $len bytes [$data]";
$r->content_type('text/plain');
$r->print("it shouldn't be printed, because the input filter has died");