Andre_br has asked for the wisdom of the Perl Monks concerning the following question:
My hostīs server was recently upgraded to Debian Sarge and, with it, to Perl 5.8 as well. I was very happy untill I realized all my email-generating scripts stopped working right away, with the following error each time I tried to send out an email:
The script is basically a contact.cgi, with this code for the emailing:Software error: Insecure $ENV{PATH} while running with -T switch at /usr/share/perl5/MIME/Lite.pm line 2571. 1 Content-type: text/html Software error: error closing /usr/lib/sendmail: (exit 65280) 1
use MIME::Lite; MIME::Lite->send("sendmail"); # ... variables definition here my $msg = MIME::Lite->new( To => "$emailsite", From => "$from", Subject => "Contato >> $assunto", Type => 'text/html', Data => "$html" ); $msg->send(); # This call triggers the error. If I comment it out ther +eīs no error message. But thereīs no email too...
Sure, itīs a taint mode issue, and I heard Perl got more rigid about taintedness from 5.6 to 5.8. But the strange thing is that none of the following steps seem to do any help:
1) Checking for taintedness of all the variables that go into the MIME::Lite->new() method. None of them is tainted. By the way, i used this code to check each one of them:
2) Checking for taintedness the $msg variable. Not tainted.if ( is_tainted($variable) ) { die "tainted"; } else { die "not tainte +d"; } sub is_tainted { return ! eval { join('',@_), kill 0; 1; }; }
Software error: Insecure dependency in exec while running with -T switch at /usr/share +/perl5/MIME/Lite.pm line 2571. 1 Content-type: text/html Software error: error closing /usr/lib/sendmail: (exit 65280) 1
Any ideas? Iīm clueless here.
Thanks
Andre_br
UPDATE: I also tried the delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; described in the perlsec, but still got the same error.
UPDATE2: I also checked my host's directories /usr/local/bin:/usr/bin:/bin and they are also not-world-writtable, as perlsecs recomends.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Taint mode trap from Perl 5.6 to 5.8
by PodMaster (Abbot) on Sep 16, 2005 at 02:06 UTC | |
by Andre_br (Pilgrim) on Sep 16, 2005 at 02:14 UTC | |
by PodMaster (Abbot) on Sep 16, 2005 at 02:36 UTC | |
by Andre_br (Pilgrim) on Sep 16, 2005 at 02:48 UTC | |
by fizbin (Chaplain) on Sep 16, 2005 at 12:04 UTC | |
|