Loading ...
Sorry, an error occurred while loading the content.

taint: why does my 'use lib' line cause problems

Expand Messages
  • Damien Carbery
    The following code generates a run-time error about an insecure dependency . If I use a constant path it doesn t generate an error. I would like to have taint
    Message 1 of 1 , Oct 31, 2005
    • 0 Attachment
      The following code generates a run-time error about an 'insecure
      dependency'.
      If I use a constant path it doesn't generate an error.
      I would like to have taint checking turned on in my CGI script, which
      uses a private module in the script's parent directory.

      Why is the error generated?
      How can I have fix it? (apart from removing -T)

      #!/usr/bin/perl -wT

      use FindBin;
      use lib "$FindBin::Bin/..";
      use CGI; # Line 5.:w

      __END__

      $ ./taint.pl
      Insecure dependency in require while running with -T switch at
      ./taint.pl line 5.
      BEGIN failed--compilation aborted at ./taint.pl line 5.
    Your message has been successfully submitted and would be delivered to recipients shortly.