When I run the perl CGI script in taint mode, I get a form error ...
Insecure dependency in some_function while running with -T switch at (eval some_line) line some_other_line.
Compilation failed in require at my-script.cgi line 39.
BEGIN failed
my- script.cgi line 39 is a use statement for the perl module, which itself does not use eval or some_function, but presumably uses another library that does. The line numbers some_line and some_other_line do not seem to make sense either in my- script.cgi or in the library that is “used” in line 39 of my-script.cgi.
Given this error, how can I track where the taint error occurs?
I tried installing a new die signal handler that should print a stack trace, i.e.
$SIG{ __DIE__ } = sub { require Carp; Carp::confess(@_); };
but this does not seem to affect the error. Perhaps this is the wrong signal to be a trap, not too early, or something more complex.
source
share