in reply to Re: using LWP in Taint Mode
in thread using LWP in Taint Mode

Hi Paul, Apologies for lack of code.. Ive just found the problems with the code. I was using CWD and getpwuid($<) to get the users working directory and ID. It turns out that in taint mode this will cause an error. I was looking at a red herring when the script suggested the error was in LWP. Thanks for all your help.

----------------
snippet of code:

#!/usr/local/bin/perl -wT

## include modules
use strict;
use CGI qw(:cgi);
use Cwd;
use LWP::UserAgent qw(!head);
use vars qw($VERSION @WEBADMIN_SERVERS);

## initialise variables
$ENV{'PATH'} = "/bin:/usr/bin";
delete @ENV{qw(CDPATH IFS BASH_ENV)};
my $dir = Cwd;
my ($login,$pass,$uid,$gid) = getpwuid($<);