in reply to Re: disable taint for just one sub
in thread disable taint for just one sub

I am very sorry, but I can't image how to build that code into the following structure of Net::Print:
Use Net::Printer; # Create new Printer Object $lineprinter = new Net::Printer( use Net::Printer; # Create new Printer Object $lineprinter = new Net::Printer( filename=>"/home/jdoe/myfile.txt", printer => "lp", server => "printserver", port => 515, lineconvert => "YES" ); # Print the file $result = $lineprinter->printfile();


I'd appreciate any help concerning that.

there are no silly questions
killerhippy

Replies are listed 'Best First'.
(ichimunki)Re: disable taint for just one sub
by ichimunki (Priest) on Jul 23, 2001 at 20:55 UTC
    You'll have to figure out where in Net::Printer it is inheriting the tainted data, as it is not from your calls to the Net::Printer methods-- I assume you are untainting things before you use them. Probably Net::Printer is using an environement variable or two. You have then three choices, either set the specific $ENV{key} from within your script, or auto-detaint all $ENV{keys} using the methods shown in the other writeups in this node wrapped in foreach my $key (keys %ENV) {...} , or rewrite the module to be taint-safe.