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?