Ok, there is a simple explanation for this problem. When
use FindBin::libs qw(base=perllib)
pushes "/path/to/perllib" into @INC, the string being pushed is tainted.
So it must be untainted first, and then pushed into @INC.
To verify this, I tried the following:
perl -Twe 'use FindBin::libs qw(base=perllib); BEGIN
{for(@INC){/(.*)/; $_=$1}} use CGI;'
and it works just fine. Of course this is an overkill since it is
untaints the entire @INC and not just the new elements.
On Wed, Jun 10, 2009 at 02:20:27AM -0400, redneb@gmx.com wrote:
Show quoted text> I just checked 1.38 under -T and there is now a very weird new (but
> related) bug. When I try
>
> perl -Twe 'use FindBin::libs qw(base=perllib); use CGI;'
>
> I get an error:
>
> Insecure dependency in require while running
> with -T switch at -e line 1.
> BEGIN failed--compilation aborted at -e line 1.
>
> On the other hand, the following:
>
> perl -Twe 'use lib "/path/to/perllib"; use CGI'
>
> works just fine. This is strange because in both cases the contents of
> @INC are the same.