You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2015/05/14 20:59:20 UTC

[Bug 7196] New: PerMsgStatus Warning

https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7196

            Bug ID: 7196
           Summary: PerMsgStatus Warning
           Product: Spamassassin
           Version: 3.4.1
          Hardware: PC
                OS: Windows 7
            Status: NEW
          Severity: normal
          Priority: P2
         Component: spamassassin
          Assignee: dev@spamassassin.apache.org
          Reporter: kmcgrail@pccc.com

This spanned from bug 7195:

>> May 13 23:35:43 mail01 amavis[17386]: (17386-12) _WARN: Use of
>> uninitialized value in concatenation (.) or string at
>> /usr/share/perl5/vendor_perl/Mail/SpamAssassin/PerMsgStatus.pm line
>> 3082.

Mark: It's because the RegistryBoundaries::uri_to_domain returns undef
when it sees %hh encoding in an URL, and the caller then tries to
concatenate it with 'dummy@', which produces this warning.
Seems harmless but annoying, should be fixed.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7196] PerMsgStatus Warning

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7196

Kevin A. McGrail <km...@pccc.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kmcgrail@pccc.com

--- Comment #1 from Kevin A. McGrail <km...@pccc.com> ---
Mark,

Is this patch what you mean or is my checking for defined sweeping something
bigger under the table?

Index: lib/Mail/SpamAssassin/PerMsgStatus.pm
===================================================================
--- lib/Mail/SpamAssassin/PerMsgStatus.pm       (revision 1679280)
+++ lib/Mail/SpamAssassin/PerMsgStatus.pm       (working copy)
@@ -3078,12 +3078,17 @@
   dbg("eval: all '*From' addrs domains (before): " . join(" ", @addrs));

   #loop through and limit to just the domain with a dummy address
+  my @tmp_addrs;
   for (my $i = 0; $i < scalar(@addrs); $i++) {
-    $addrs[$i] =
'dummy@'.$self->{main}->{registryboundaries}->uri_to_domain($addrs[$i]);
+    #Checking if the return from uri_to_domain is defined - bug 7196 KAM 
+    my $tmp_addrs =
$self->{main}->{registryboundaries}->uri_to_domain($addrs[$i]);
+    if (defined $tmp_addrs) {
+      push (@tmp_addrs, 'dummy@'.$tmp_addrs);
+    }
   }

   #Remove duplicate domains
-  my %addrs = map { $_ => 1 } @addrs;
+  my %addrs = map { $_ => 1 } @tmp_addrs;
   @addrs = keys %addrs;

   dbg("eval: all '*From' addrs domains (after uri to domain): " . join(" ",
@addrs));

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7196] PerMsgStatus Warning

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7196

--- Comment #2 from Mark Martinec <Ma...@ijs.si> ---
Created attachment 5300
  --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5300&action=edit
proposed patch

> Is this patch what you mean or is my checking for defined sweeping
> something bigger under the table?

Seems fine to me.

Attached is my version (sorry for duplicating your work, unintentionally).
Treats domains case-insensitively, retains original order instead of random.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7196] PerMsgStatus Warning

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7196

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #5300|0                           |1
        is obsolete|                            |

--- Comment #5 from Mark Martinec <Ma...@ijs.si> ---
Created attachment 5301
  --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5301&action=edit
proposed patch (fixes previous patch)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7196] PerMsgStatus Warning

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7196

--- Comment #4 from Mark Martinec <Ma...@ijs.si> ---
trunk:
  Sending lib/Mail/SpamAssassin/PerMsgStatus.pm
Committed revision 1679652.

3.4:
  Sending lib/Mail/SpamAssassin/PerMsgStatus.pm
Committed revision 1679653.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7196] PerMsgStatus Warning

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7196

Sidney Markowitz <si...@sidney.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |sidney@sidney.com
         Resolution|---                         |FIXED

--- Comment #7 from Sidney Markowitz <si...@sidney.com> ---
The patch in comment 5 is already in the commits. It looks like Mark was
posting corrections to the proposed patch that reflect what he had already
committed. I'm closing this as fixed.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7196] PerMsgStatus Warning

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7196

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|Undefined                   |3.4.2

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7196] PerMsgStatus Warning

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7196

--- Comment #3 from Kevin A. McGrail <km...@pccc.com> ---
(In reply to Mark Martinec from comment #2)
> Created attachment 5300 [details]
> proposed patch
> 
> > Is this patch what you mean or is my checking for defined sweeping
> > something bigger under the table?
> 
> Seems fine to me.
> 
> Attached is my version (sorry for duplicating your work, unintentionally).
> Treats domains case-insensitively, retains original order instead of random.

Your fix looks good too with the extra benefit of case insensitivity (not sure
I care about the order that much).  And definitely no worries about the
overlap.  Please commit when ready.

Regards,
KAM

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7196] PerMsgStatus Warning

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7196

--- Comment #6 from Kevin A. McGrail <km...@pccc.com> ---
Can this be marked resolved? I'm not clear if the patches are committed or is
there a fix needed still?

-- 
You are receiving this mail because:
You are the assignee for the bug.