]> git.proxmox.com Git - proxmox-spamassassin.git/commitdiff
add fix for SA bug 7231
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 24 Nov 2017 07:07:39 +0000 (08:07 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 24 Nov 2017 07:07:39 +0000 (08:07 +0100)
debian/patches/bug_760277_net_dns_URIDNSBL [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/bug_760277_net_dns_URIDNSBL b/debian/patches/bug_760277_net_dns_URIDNSBL
new file mode 100644 (file)
index 0000000..e1b5896
--- /dev/null
@@ -0,0 +1,34 @@
+Description: Fix uninitialized values in URIDNSBL.pm with Net::DNS 1.01
+Origin: upstream, https://svn.apache.org/viewvc/spamassassin/branches/3.4/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm?r1=1676616&r2=1694126&pathrev=1694126&view=patch
+Bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7231
+Bug-Debian: https://bugs.debian.org/760277
+Last-Update: 2016-09-29
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm
++++ b/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm
+@@ -942,9 +942,8 @@
+     next unless (defined($str) && defined($dom));
+     dbg("uridnsbl: got($j) NS for $dom: $str");
+-    if ($str =~ /IN\s+NS\s+(\S+)/) {
+-      my $nsmatch = lc $1;
+-      $nsmatch =~ s/\.$//;
++    if ($rr->type eq 'NS') {
++      my $nsmatch = lc $rr->nsdname;  # available since at least Net::DNS 0.14
+       my $nsrhblstr = $nsmatch;
+       my $fullnsrhblstr = $nsmatch;
+@@ -1025,9 +1024,9 @@
+     }
+     dbg("uridnsbl: complete_a_lookup got(%d) A for %s: %s", $j,$hname,$str);
+-    local $1;
+-    if ($str =~ /IN\s+A\s+(\S+)/) {
+-      $self->lookup_dnsbl_for_ip($pms, $ent->{obj}, $1);
++    if ($rr->type eq 'A') {
++      my $ip_address = $rr->rdatastr;
++      $self->lookup_dnsbl_for_ip($pms, $ent->{obj}, $ip_address);
+     }
+   }
+ }
index 3b4a0cd2dcba467fa162b95c297001dc3aa24b6e..849982452edf4bee4541a8b1597ed5205d0fc52c 100644 (file)
@@ -1,3 +1,4 @@
 disable-dkim.patch
 bug_835494_perl_INC
 disable-dkim.patch
 bug_835494_perl_INC
+bug_760277_net_dns_URIDNSBL
 bug_821385_dnsresolver
 bug_821385_dnsresolver