]>
Commit | Line | Data |
---|---|---|
27765d29 DM |
1 | Description: Fix uninitialized values in URIDNSBL.pm with Net::DNS 1.01 |
2 | 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 | |
3 | Bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7231 | |
4 | Bug-Debian: https://bugs.debian.org/760277 | |
5 | Last-Update: 2016-09-29 | |
6 | --- | |
7 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ | |
8 | --- a/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm | |
9 | +++ b/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm | |
10 | @@ -942,9 +942,8 @@ | |
11 | next unless (defined($str) && defined($dom)); | |
12 | dbg("uridnsbl: got($j) NS for $dom: $str"); | |
13 | ||
14 | - if ($str =~ /IN\s+NS\s+(\S+)/) { | |
15 | - my $nsmatch = lc $1; | |
16 | - $nsmatch =~ s/\.$//; | |
17 | + if ($rr->type eq 'NS') { | |
18 | + my $nsmatch = lc $rr->nsdname; # available since at least Net::DNS 0.14 | |
19 | my $nsrhblstr = $nsmatch; | |
20 | my $fullnsrhblstr = $nsmatch; | |
21 | ||
22 | @@ -1025,9 +1024,9 @@ | |
23 | } | |
24 | dbg("uridnsbl: complete_a_lookup got(%d) A for %s: %s", $j,$hname,$str); | |
25 | ||
26 | - local $1; | |
27 | - if ($str =~ /IN\s+A\s+(\S+)/) { | |
28 | - $self->lookup_dnsbl_for_ip($pms, $ent->{obj}, $1); | |
29 | + if ($rr->type eq 'A') { | |
30 | + my $ip_address = $rr->rdatastr; | |
31 | + $self->lookup_dnsbl_for_ip($pms, $ent->{obj}, $ip_address); | |
32 | } | |
33 | } | |
34 | } |