source: trunk/dports/perl/p5-razor-agents/files/patch-razor2.spamassassin @ 21494

Last change on this file since 21494 was 21494, checked in by eridius@…, 13 years ago

Massive update to svn properties on files:
All patchfiles have svn:eol-style removed.
All files that are not in fact able to be executed have svn:executable removed
All binary files have svn:eol-style removed (and are probably corrupt)
All binary files have svn:mime-type set to application/octet-stream
All files which are not patchfiles or binary files have svn:eol-style set to native
All Portfiles have svn:eol-style set to native and svn:executable removed

File size: 2.2 KB
Line 
1--- ../razor-agents-2.36.orig/lib/Razor2/Client/Agent.pm        Tue May  6 17:00:38 2003
2+++ ./lib/Razor2/Client/Agent.pm        Thu Mar 11 23:11:11 2004
3@@ -981,6 +981,7 @@
4     my @fns;
5     if (opendir D,$self->{razorhome}) {
6         @fns = map "$self->{razorhome}/$_", grep /^server\.[\S]+\.conf$/, readdir D;
7+        @fns = map { /^(\S+)$/, $1 } @fns; # untaint
8         closedir D;
9     }
10     foreach (@fns) {
11--- ../razor-agents-2.36.orig/lib/Razor2/Client/Config.pm       Mon Apr 21 12:59:56 2003
12+++ ./lib/Razor2/Client/Config.pm       Thu Mar 11 23:11:11 2004
13@@ -333,9 +333,11 @@
14         if ($fn =~ /^(.*)\/([^\/]+)$/) {
15             my $dir = $1;
16             $fn = readlink $fn;
17+            $fn = $1 if $fn =~ /^(\S+)$/; # untaint readlink
18             $fn = "$dir/$fn" unless $fn =~ /^\//;
19         } else {
20             $fn = readlink $fn;
21+            $fn = $1 if $fn =~ /^(\S+)$/; # untaint readlink
22         }
23     }
24 }
25@@ -376,13 +378,13 @@
26         chomp;
27         next if /^\s*#/;
28         if ($nothash) {
29-            s/^\s+//; s/\s+$//;
30+            next unless s/^\s*(.+?)\s*$/$1/; # untaint
31             $conf->{$_} = 7;
32             push @lines, $_;
33         } else {
34             next unless /=/;
35-            my ($attribute, $value) = split /\=/, $_, 2;
36-            $attribute =~ s/^\s+//; $attribute =~ s/\s+$//;
37+            my ($attribute, $value) = /^\s*(.+?)\s*=\s*(.+?)\s*$/; # untaint
38+            next unless (defined $attribute && defined $value);
39             $conf->{$attribute} = $self->parse_value($value);
40         }
41         $total++;
42--- ../razor-agents-2.36.orig/lib/Razor2/Client/Core.pm Tue Aug  5 11:07:53 2003
43+++ ./lib/Razor2/Client/Core.pm Thu Mar 11 23:11:11 2004
44@@ -218,8 +218,10 @@
45         foreach $rr ($query->answer) {
46             my $pushed = 0;
47             if ($rr->type eq "A") {
48-                push @list, $rr->address;
49-                $pushed = 1;
50+                if ($rr->address =~ m/^(\d+\.\d+\.\d+\.\d+)$/) {
51+                    push @list, $1;
52+                    $pushed = 1;
53+                }
54             } elsif ($rr->type eq "CNAME") {
55                 if ($rr->cname eq 'list.terminator') {
56                     pop @list if $pushed;
Note: See TracBrowser for help on using the repository browser.