Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
It works great, but when I turn on Taint Mode by adding -T to the #!/usr/bin/perl line, I get the following error message:open (MAIL,"|sendmail -t") || die "Unable to open sendmail"; print MAIL "To: $recipient\n"; print MAIL "From: $from_email\n"; print MAIL "Reply-to: $reply_email\n"; print MAIL "Subject: $subject\n\n"; print MAIL "$body"; close (MAIL) || die "Unable to send e-mail";
Line 137 if, of course, this one:Insecure $ENV{PATH} while running with -T switch at submit.cgi line 13 +7.
So my question is.... what is the proper way of securing this operation so that Taint Mode is happy (as well it deserves to be)?open (MAIL,"|sendmail -t") || die "Unable to open sendmail";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Taint Mode Doesn't Like SENDMAIL Pipe
by isotope (Deacon) on May 11, 2001 at 20:28 UTC | |
|
Re: Taint Mode Doesn't Like SENDMAIL Pipe
by mr.nick (Chaplain) on May 11, 2001 at 20:29 UTC | |
|
(ar0n) Re: Taint Mode Doesn't Like SENDMAIL Pipe
by ar0n (Priest) on May 11, 2001 at 20:50 UTC | |
|
Re: Taint Mode Doesn't Like SENDMAIL Pipe
by davorg (Chancellor) on May 11, 2001 at 20:40 UTC | |
by isotope (Deacon) on May 12, 2001 at 01:01 UTC | |
by Anonymous Monk on May 11, 2001 at 23:39 UTC | |
|
Re: Taint Mode Doesn't Like SENDMAIL Pipe
by Anonymous Monk on May 11, 2001 at 22:46 UTC |