Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I wonder if anyone can explain what would cause a perl CGI script to fail when accessed in certain web browsers and succeed in others.
All I’m doing is taking an email address from a form, feeding it to a validation sub that untaints it, then using it with the –f option to sendmail. It works fine in Mozilla browsers on both Mac and PC, as well as in Safari on the Mac, but Internet Explorer on either platform gives “Insecure dependency in piped open while running with -T switch” at the line where I open a pipe to sendmail. (I'm using CGI::Carp qw(fatalsToBrowser).)
The relevant bits are
... my $user_email = validate_email_address( param( "Email" ) ); ... open MAIL, "| /usr/lib/sendmail -t -i -f '$user_email' " or die "Could not open sendmail: $!";
The validate_email_address sub comes straight from CGI Programming with Perl, chapter 9. It’s too long to include here but its final line is
return $addr_to_check =~ /^$address$/ox ? $addr_to_check : "";This is on a company intranet, running Perl 5.004_04. Server is iPlanet-WebServer-Enterprise/6.0.
Any suggestions on how to tackle this would be greatly welcomed!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Browser-specific perl error??
by mattriff (Chaplain) on Mar 12, 2004 at 16:13 UTC | |
by Abigail-II (Bishop) on Mar 12, 2004 at 16:38 UTC | |
by UnderMine (Friar) on Mar 12, 2004 at 17:26 UTC | |
|
Re: Browser-specific perl error??
by Happy-the-monk (Canon) on Mar 12, 2004 at 16:04 UTC |