You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by mm...@apache.org on 2011/05/04 21:18:34 UTC

svn commit: r1099562 - /spamassassin/trunk/lib/Mail/SpamAssassin/Dns.pm

Author: mmartinec
Date: Wed May  4 19:18:34 2011
New Revision: 1099562

URL: http://svn.apache.org/viewvc?rev=1099562&view=rev
Log:
Bug 6565: The dotted-quad subtest should not be interpreted as a regexp

Modified:
    spamassassin/trunk/lib/Mail/SpamAssassin/Dns.pm

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Dns.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Dns.pm?rev=1099562&r1=1099561&r2=1099562&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Dns.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Dns.pm Wed May  4 19:18:34 2011
@@ -292,9 +292,9 @@ sub process_dnsbl_set {
   while (my ($subtest, $rule) = each %{ $self->{dnspost}->{$set} }) {
     next if $self->{tests_already_hit}->{$rule};
 
-    # exact substr (usually IP address)
-    if ($subtest eq $rdatastr) {
-      $self->dnsbl_hit($rule, $question, $answer);
+    if ($subtest =~ /^\d+\.\d+\.\d+\.\d+$/) {
+      # test for exact equality, not a regexp (usually IP address)
+      $self->dnsbl_hit($rule, $question, $answer)  if $subtest eq $rdatastr;
     }
     # senderbase
     elsif ($subtest =~ s/^sb://) {