CGI perl with -T
am 24.08.2007 02:48:32 von George
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
am 24.08.2007 02:58:14 von Gunnar Hjalmarsson
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
am 24.08.2007 03:15:14 von George
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