perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/t/filter/TestFilter in_error.pm
Date Thu, 08 Jul 2004 06:54:28 GMT
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");
  
  
  

Mime
View raw message