CGI perl with -T
Help...
I am trying to use sendmail in a CGI script. When I use the OPEN command
(open sMail, "| /usr/lib/sendmail -oi -t -odq";)
I get the error (Insecure $ENV{PATH} while running with -T switch)
I don't want to disable the -T switch but I need to be able to call
sendmail.
Any Ideas?
Thanks
Re: CGI perl with -T
George wrote:
> I am trying to use sendmail in a CGI script. When I use the OPEN command
> (open sMail, "| /usr/lib/sendmail -oi -t -odq";)
> I get the error (Insecure $ENV{PATH} while running with -T switch)
> I don't want to disable the -T switch but I need to be able to call
> sendmail.
Set $ENV{PATH} explicitly.
$ENV{PATH} = '';
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
Re: CGI perl with -T
Gunnar Hjalmarsson wrote:
> George wrote:
>> I am trying to use sendmail in a CGI script. When I use the OPEN
>> command (open sMail, "| /usr/lib/sendmail -oi -t -odq";)
>> I get the error (Insecure $ENV{PATH} while running with -T switch)
>> I don't want to disable the -T switch but I need to be able to call
>> sendmail.
>
> Set $ENV{PATH} explicitly.
>
> $ENV{PATH} = '';
>
Perfect!, That worked well.
Thanks