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...@issues.apache.org on 2010/04/19 14:21:54 UTC
[Bug 6416] New: Avoid warnings in AutoWhitelist when Received header
is bad or misparsed
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6416
Summary: Avoid warnings in AutoWhitelist when Received header
is bad or misparsed
Product: Spamassassin
Version: 3.3.1
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Libraries
AssignedTo: dev@spamassassin.apache.org
ReportedBy: Mark.Martinec@ijs.si
Jari Fredriksson wrote on the ML on 2010-04-07:
Apr 7 10:07:41 lancaster check[1339]: Use of uninitialized value
$origip in concatenation (.) or string at
/usr/local/share/perl/5.10.0/Mail/SpamAssassin/AutoWhitelist.pm line 346.
3.3.1 in Debian Lenny, compiled via CPAN.
I have not seen this message before, but now it came. I have no idea of
the message which caused this.
My reply was:
Probably as a result of a syntactically incorrect Received header field,
or incorrect parsing of it (see bug 6402).
Here below is a patch to avoid warnings (which are innocent, but still...)
Please open a bug report so that we can properly fold-in the patch.
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 6416] [review] Avoid warnings in AutoWhitelist when Received
header is bad or misparsed
Posted by bu...@issues.apache.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6416
Kevin A. McGrail <km...@pccc.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kmcgrail@pccc.com
Status Whiteboard|needs 1 vote for 3.3.2 |ready to commit
--- Comment #5 from Kevin A. McGrail <km...@pccc.com> 2010-05-25 18:09:15 EDT ---
(In reply to comment #4)
> ah, ok. +1
+1 here as well.
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 6416] [review] Avoid warnings in AutoWhitelist when Received
header is bad or misparsed
Posted by bu...@issues.apache.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6416
Mark Martinec <Ma...@ijs.si> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 6416] [review] Avoid warnings in AutoWhitelist when Received
header is bad or misparsed
Posted by bu...@issues.apache.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6416
Justin Mason <jm...@jmason.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status Whiteboard|needs 2 votes for 3.3.2 |needs 1 vote for 3.3.2
--- Comment #4 from Justin Mason <jm...@jmason.org> 2010-04-21 12:15:01 EDT ---
ah, ok. +1
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 6416] [review] Avoid warnings in AutoWhitelist when Received
header is bad or misparsed
Posted by bu...@issues.apache.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6416
--- Comment #3 from Mark Martinec <Ma...@ijs.si> 2010-04-21 12:08:05 EDT ---
> I don't understand the reasoning here. why does this move the else clause?
The issue here is that either:
- $origip is undefined in the first place
- or the ip_to_awl_key() returns undef
So in this second case, $origip would not end up as 'none', but would
remain undef, leading to the warning.
There is no 'else' in the fixed code, just two independent 'if's.
The $origip becomes 'none' either when it was initially undef,
or when ip_to_awl_key() returns undef.
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 6416] Avoid warnings in AutoWhitelist when Received header is
bad or misparsed
Posted by bu...@issues.apache.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6416
--- Comment #1 from Mark Martinec <Ma...@ijs.si> 2010-04-19 08:33:57 EDT ---
Created an attachment (id=4747)
--> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4747)
patch to avoid the warning
trunk:
r931606 | mmartinec | 2010-04-07 18:16:53 +0200 (Wed, 07 Apr 2010)
avoid undef warnings in AutoWhitelist.pm as a result of
incorrect Received header field or its incorrect parsing
(as in Bug 6402)
Attached is a proposed patch for 3.3.2.
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 6416] [review] Avoid warnings in AutoWhitelist when Received
header is bad or misparsed
Posted by bu...@issues.apache.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6416
Justin Mason <jm...@jmason.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jm@jmason.org
--- Comment #2 from Justin Mason <jm...@jmason.org> 2010-04-21 11:47:25 EDT ---
Mark:
@@ -336,12 +338,13 @@
$addr = lc $addr;
$addr =~ s/[\000\;\'\"\!\|]/_/gs; # paranoia
+ if (defined $origip) {
+ $origip = $self->ip_to_awl_key($origip);
+ }
if (!defined $origip) {
# could not find an IP address to use, could be localhost mail
# or from the user running "add-addr-to-*".
$origip = 'none';
- } else {
- $origip = $self->ip_to_awl_key($origip);
}
return $addr . "|ip=" . $origip;
}
I don't understand the reasoning here. why does this move the else clause?
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 6416] [review] Avoid warnings in AutoWhitelist when Received
header is bad or misparsed
Posted by bu...@issues.apache.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6416
Mark Martinec <Ma...@ijs.si> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P2 |P3
Target Milestone|Undefined |3.3.2
Summary|Avoid warnings in |[review] Avoid warnings in
|AutoWhitelist when Received |AutoWhitelist when Received
|header is bad or misparsed |header is bad or misparsed
Status Whiteboard| |needs 2 votes for 3.3.2
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 6416] [review] Avoid warnings in AutoWhitelist when Received
header is bad or misparsed
Posted by bu...@issues.apache.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6416
Mark Martinec <Ma...@ijs.si> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #6 from Mark Martinec <Ma...@ijs.si> 2010-05-29 14:14:03 EDT ---
3.3:
Bug 6416: avoid undef warnings in AutoWhitelist.pm as a result
of incorrect Received header field or its incorrect parsing
Sending lib/Mail/SpamAssassin/AutoWhitelist.pm
Committed revision 949432.
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.