Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -T
    # This is taint.pl
    ...
    my $fh=IO::File->new();
    $fh->open($fn,'w') or die "open $fn failed: $!";
    $fh->print("This should not happen!");
    
  2. or download this
    /tmp>perl -T taint.pl /dev/null
    Insecure dependency in open while running with -T switch at /usr/lib64
    +/perl5/IO/File.pm line 184.
    ...
            IO::File::open(IO::File=GLOB(0x1520be8), "/dev/null", "w") cal
    +led at taint.pl line 10
    
    /tmp>