stas        2004/10/17 19:26:04

  Modified:    t/lib/TestCommon Utils.pm
  Log:
  the append of " " is crucial with older Perls (5.6), which won't
  consider a scalar with PV = ""\0 as tainted, even though it has
  the taint magic attached
  
  Revision  Changes    Path
  1.3       +4 -1      modperl-2.0/t/lib/TestCommon/Utils.pm
  
  Index: Utils.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/lib/TestCommon/Utils.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -u -r1.2 -r1.3
  --- Utils.pm  1 Oct 2004 03:30:11 -0000       1.2
  +++ Utils.pm  18 Oct 2004 02:26:04 -0000      1.3
  @@ -2,7 +2,10 @@
   
   sub is_tainted {
       my $data = shift;
  -    eval { eval $data };
  +    # the append of " " is crucial with older Perls (5.6), which won't
  +    # consider a scalar with PV = ""\0 as tainted, even though it has
  +    # the taint magic attached
  +    eval { eval $data . " " };
       return ($@ && $@ =~ qr/Insecure dependency in eval/) ? 1 : 0;
   }
   
  
  
  

Reply via email to