diff options
author | leeym <leeym@FreeBSD.org> | 2003-10-04 22:10:12 +0800 |
---|---|---|
committer | leeym <leeym@FreeBSD.org> | 2003-10-04 22:10:12 +0800 |
commit | e104b0d4df3a43867f1881c0f47ef75f641b9536 (patch) | |
tree | b2b18be71ab61efaea2a4aeb8f419cbb59d6544a /mail/razor-agents | |
parent | 2ed2c879b1c31357ae11b5e0456da107a4de82fb (diff) | |
download | freebsd-ports-gnome-e104b0d4df3a43867f1881c0f47ef75f641b9536.tar.gz freebsd-ports-gnome-e104b0d4df3a43867f1881c0f47ef75f641b9536.tar.zst freebsd-ports-gnome-e104b0d4df3a43867f1881c0f47ef75f641b9536.zip |
use the patch comes from SpamAssassin FAQ instead
Noticed by: Mark Edwards <mark@antsclimbtree.com>
Obtained from: SpamAssassin FAQ
Diffstat (limited to 'mail/razor-agents')
-rw-r--r-- | mail/razor-agents/files/patch-lib::Razor2::Client::Agent.pm | 8 | ||||
-rw-r--r-- | mail/razor-agents/files/patch-lib::Razor2::Client::Config.pm | 29 |
2 files changed, 33 insertions, 4 deletions
diff --git a/mail/razor-agents/files/patch-lib::Razor2::Client::Agent.pm b/mail/razor-agents/files/patch-lib::Razor2::Client::Agent.pm index 808e3d7eed0f..4903fa5be7b1 100644 --- a/mail/razor-agents/files/patch-lib::Razor2::Client::Agent.pm +++ b/mail/razor-agents/files/patch-lib::Razor2::Client::Agent.pm @@ -15,3 +15,11 @@ } next unless defined(my $line = <$fh>); if ($line =~ /^From /) { +@@ -969,6 +969,7 @@ + my @fns; + if (opendir D,$self->{razorhome}) { + @fns = map "$self->{razorhome}/$_", grep /^server\.[\S]+\.conf$/, readdir D; ++ @fns = map { /^(\S+)$/, $1 } @fns; # untaint + closedir D; + } + foreach (@fns) { diff --git a/mail/razor-agents/files/patch-lib::Razor2::Client::Config.pm b/mail/razor-agents/files/patch-lib::Razor2::Client::Config.pm index da79781bc383..ad400c27fca9 100644 --- a/mail/razor-agents/files/patch-lib::Razor2::Client::Config.pm +++ b/mail/razor-agents/files/patch-lib::Razor2::Client::Config.pm @@ -1,10 +1,31 @@ --- lib/Razor2/Client/Config.pm.orig 2002-11-25 19:13:59.000000000 +0100 +++ lib/Razor2/Client/Config.pm 2002-11-11 19:29:17.000000000 +0100 -@@ -373,6 +373,7 @@ +@@ -323,9 +323,11 @@ + if ($fn =~ /^(.*)\/([^\/]+)$/) { + my $dir = $1; + $fn = readlink $fn; ++ $fn = $1 if $fn =~ /^(\S+)$/; # untaint readlink + $fn = "$dir/$fn" unless $fn =~ /^\//; + } else { + $fn = readlink $fn; ++ $fn = $1 if $fn =~ /^(\S+)$/; # untaint readlink + } + } + } +@@ -366,13 +368,13 @@ + chomp; + next if /^\s*#/; + if ($nothash) { +- s/^\s+//; s/\s+$//; ++ next unless s/^\s*(.+?)\s*$/$1/; # untaint + $conf->{$_} = 7; + push @lines, $_; + } else { next unless /=/; - my ($attribute, $value) = split /\=/, $_, 2; - $attribute =~ s/^\s+//; $attribute =~ s/\s+$//; -+ $value = $1 if $value =~ /^(.*)$/; # untaint! +- my ($attribute, $value) = split /\=/, $_, 2; +- $attribute =~ s/^\s+//; $attribute =~ s/\s+$//; ++ my ($attribute, $value) = /^\s*(.+?)\s*=\s*(.+?)\s*$/; # untaint ++ next unless (defined $attribute && defined $value); $conf->{$attribute} = $self->parse_value($value); } $total++; |