in reply to using LWP in Taint Mode

Is it possible to show a mininal piece of code which reproduces this behavour? Without it it will be guessing what's wrong...

Paul

Replies are listed 'Best First'.
Re^2: using LWP in Taint Mode
by hoops99 (Initiate) on Jul 11, 2005 at 15:24 UTC
    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($<);