in reply to Re^2: Taint mode trap from Perl 5.6 to 5.8
in thread Taint mode trap from Perl 5.6 to 5.8
From what you've shown only $from could be tainted. So either you're leaving something out, or your copy of MIME::Lite is different. In either case you should further examine the values of @cmd.my %p = @_; $p{Sendmail} ||= "/usr/lib/sendmail"; ### Start with the command and basic args: my @cmd = ($p{Sendmail}, @{$p{BaseArgs} || ['-t', '-oi', '-oem']}) +; ### See if we are forcibly setting the sender: $p{SetSender} = 1 if defined($p{FromSender}); ### Add the -f argument, unless we're explicitly told NOT to: unless (exists($p{SetSender}) and !$p{SetSender}) { my $from = $p{FromSender} || ($self->get('From'))[0]; if ($from) { my ($from_addr) = extract_addrs($from); push @cmd, "-f$from_addr" if $from_addr; } } ### Open the command in a taint-safe fashion: my $pid = open SENDMAIL, "|-"; defined($pid) or die "open of pipe failed: $!\n"; if (!$pid) { ### child exec(@cmd) or die "can't exec $p{Sendmail}: $!\n"; ### NOTREACHED }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Taint mode trap from Perl 5.6 to 5.8 - going mad!
by Andre_br (Pilgrim) on Sep 16, 2005 at 02:48 UTC | |
by fizbin (Chaplain) on Sep 16, 2005 at 12:04 UTC | |
by Anonymous Monk on Sep 16, 2005 at 19:10 UTC |