Insecure $ENV{PATH} while running with -T switch at /usr/local/share/perl5/MIME/Lite.pm

------=_NextPart_000_000D_01CB3FF8.AF14DB10
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

I am using MIME::Lite::TT::HTML in my module to send emails and this worked
until I decided to use taint mode. Now Perl is not happy anymore. This is
the first time I am using taint mode, so I am not sure whether my code is
causing this exception or the underlying MIME::Lite::TT::HTML or
MIME::Lite.

Insecure $ENV{PATH} while running with -T switch at
/usr/local/share/perl5/MIME/Lite.pm line 2689., referer:
http://192.168.0.88/cgi-bin/dashboard.cgi




In my mobile I have this sub for sending mail and it has always worked until
I switched on the -T.

sub sendmail {

my (%params, %options, $received_arg);
$received_arg = shift;
%params = %$received_arg;

$params{site_name} = $site_name;

# Template directory path
$options{INCLUDE_PATH} = '/var/www/html/templates/';

my $mail_msg = MIME::Lite::TT::HTML->new(
From => "$public_email",
To => "$params{'E-mail'}",
Subject => "$params{'Subject'}",
Template => {
text => "$params{'Text_Tmpl'}",
html => "$params{'HTML_Tmpl'}",
},
TmplOptions => \%options,
TmplParams => \%params,

);

$mail_msg->send;

}



Main program has this codes somewhere.

my %password_reset_mail_parameters = (
'Fname' => "$db_fname",
'Lname' => "$db_lname",
'E-mail' => "$reset_email",
'Subject' => "Your Password Reset",
'Link' => "$reset_link",
'Text_Tmpl' => "password_reset_confirm.txt.tmpl",
'HTML_Tmpl' => "password_reset_confirm.html.tmpl",
);

# Send the requested information.
sendmail(\%password_reset_mail_parameters);

Any ideas?

------=_NextPart_000_000D_01CB3FF8.AF14DB10--
Mimi Cafe [ Fr, 20 August 2010 00:46 ] [ ID #2046406 ]

Re: Insecure $ENV{PATH} while running with -T switch at/usr/local/share/perl5/MIME/Lite.pm

On 8/19/10 Thu Aug 19, 2010 3:46 PM, "Mimi Cafe" <mimicafe [at] googlemail.com>
scribbled:

> I am using MIME::Lite::TT::HTML in my module to send emails and this worked
> until I decided to use taint mode. Now Perl is not happy anymore. This is
> the first time I am using taint mode, so I am not sure whether my code is
> causing this exception or the underlying MIME::Lite::TT::HTML or
> MIME::Lite.
>
> Insecure $ENV{PATH} while running with -T switch at
> /usr/local/share/perl5/MIME/Lite.pm line 2689., referer:
> http://192.168.0.88/cgi-bin/dashboard.cgi
>

(Program snipped)

> Any ideas?

Yes. Read 'perldoc perlsec', then set $ENV{PATH} to the directory where the
sendmail program is located on your system.



--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/
Jim Gibson [ Fr, 20 August 2010 01:05 ] [ ID #2046408 ]
Perl » gmane.comp.lang.perl.beginners » Insecure $ENV{PATH} while running with -T switch at /usr/local/share/perl5/MIME/Lite.pm

Vorheriges Thema: perl beginner looking to write very simple blog software; what do Ineed to know?
Nächstes Thema: Strange behaviour while using DBI with binding