Skip to content

Commit

Permalink
Merge pull request #4 from stoecker/master
Browse files Browse the repository at this point in the history
fix untaint code
  • Loading branch information
mpaperno committed Dec 8, 2013
2 parents 9088ae5 + 7706c36 commit 5ebb39c
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions spampd.pl
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
######################
# SpamPD - spam proxy daemon
#
# v2.41 - 11-Aug-10
# v2.40 - 10-Jan-09
# v2.32 - 02-Feb-06
# v2.30 - 31-Oct-05
# v2.42 - 08-Dec-13
# v2.41 - 11-Aug-10
# v2.40 - 10-Jan-09
# v2.32 - 02-Feb-06
# v2.30 - 31-Oct-05
# v2.21 - 23-Oct-05
# v2.20 - 05-Oct-04
# v2.13 - 24-Nov-03
Expand Down Expand Up @@ -424,7 +425,7 @@ BEGIN

use vars qw(@ISA $VERSION);
our @ISA = qw(Net::Server::PreForkSimple);
our $VERSION = '2.30';
our $VERSION = '2.42';

sub process_message {
my ($self, $fh) = @_;
Expand Down Expand Up @@ -871,23 +872,17 @@ ($$$)
}

# Untaint some options provided by admin command line.
$logsock =~ /^(.)$/;
$logsock = $1;
$logsock = $1 if $logsock =~ /^(.*)$/;

$pidfile =~ /^(.)$/;
$pidfile = $1;
$pidfile = $1 if $pidfile =~ /^(.*)$/;

$relayhost =~ /^(.)$/;
$relayhost = $1;
$relayhost = $1 if $relayhost =~ /^(.*)$/;

$relayport =~ /^(.)$/;
$relayport = $1;
$relayport = $1 if $relayport =~ /^(.*)$/;

$host =~ /^(.)$/;
$host = $1;
$host = $1 if $host =~ /^(.*)$/;

$port =~ /^(.*)$/;
$port = $1;
$port = $1 if $port =~ /^(.*)$/;
#

if ( $options{tagall} ) { $tagall = 1; }
Expand Down

0 comments on commit 5ebb39c

Please sign in to comment.