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...@spamassassin.apache.org on 2020/02/20 09:09:46 UTC
[Bug 7798] New: Incorrect call to Encode::decode() in
Mail/SpamAssassin/Message.pm bails scanning of message.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7798
Bug ID: 7798
Summary: Incorrect call to Encode::decode() in
Mail/SpamAssassin/Message.pm bails scanning of
message.
Product: Spamassassin
Version: 3.4.4
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: Libraries
Assignee: dev@spamassassin.apache.org
Reporter: sabugs@freshdot.net
Target Milestone: Undefined
There's an incorrect call to the Encode::decode() function in
Mail/SpamAssassin/Message.pm, sub _parse_normal:
| $msg->{'name'} = Encode::decode("MIME-Header", $msg->{'name'});
Resulting in log lines:
| warn: plugin: eval failed: Unknown encoding 'MIME-Header' at
/usr/share/perl5/Mail/SpamAssassin/Message.pm line 1079.
Encode::decode() seems to expect a valid charset as first argument, not a
scalar 'MIME-Header'.
The effect of a message hitting this condition is that it is passed unscanned
as 'Not Spam'.
The part of the offending message that caused this condition, had incorrect
formatting of MIME headers:
| --b1_062eb3f6cfc5596181d8a530cc41f3ea
| Content-Type: ; name="d41de55ba35893873a220bbf8fa539fd"
| Content-Transfer-Encoding: base64
| Content-ID: <d41de55ba35893873a220bbf8fa539fd>
|
|
|
|
| --b1_062eb3f6cfc5596181d8a530cc41f3ea
| Content-Type: image/gif; name="a857ec7d29eed25bbc7359368bb699f2"
| Content-Transfer-Encoding: base64
| Content-ID: <a857ec7d29eed25bbc7359368bb699f2>
|
| R0[..snipped..]==
|
|
| --b1_062eb3f6cfc5596181d8a530cc41f3ea--
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7798] Incorrect call to Encode::decode() in
Mail/SpamAssassin/Message.pm bails scanning of message.
Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7798
Sander Smeenk <sa...@freshdot.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sabugs@freshdot.net
--- Comment #3 from Sander Smeenk <sa...@freshdot.net> ---
(In reply to Henrik Krohns from comment #1)
> Are you saying that the error appears only on this message and not all?
Yes. That specific message.
I've obfuscated it a bit and attached it to this bugreport.
> Are you sure Encode::MIME::Header module is installed?
> perl -MEncode::MIME::Header -e 'print $Encode::MIME::Header::VERSION'
Reports back: '2.24'.
This is SpamAssassin 3.4.2 running on Ubuntu Bionic 18.04.4.
My assumption of an incorrect call with 'MIME-Header' as argument was indeed
incorrect. A short test shows that syntax is indeed accepted. Something else
must be awry.
I was thrown off by the warning message stating 'Unknown encoding' and other
uses of Encode::decode() i found, directly followed by a valid charset, not a
scalar like 'MIME-Header'.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7798] Incorrect call to Encode::decode() in
Mail/SpamAssassin/Message.pm bails scanning of message.
Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7798
Giovanni Bechis <gi...@paclan.it> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |WORKSFORME
--- Comment #6 from Giovanni Bechis <gi...@paclan.it> ---
I cannot reproduce it neither with Encode::MIME::Header 2.11 (CentOS6)
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7798] Incorrect call to Encode::decode() in
Mail/SpamAssassin/Message.pm bails scanning of message.
Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7798
jeffrey@bit.nl changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jeffrey@bit.nl
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7798] Incorrect call to Encode::decode() in
Mail/SpamAssassin/Message.pm bails scanning of message.
Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7798
--- Comment #4 from Sander Smeenk <sa...@freshdot.net> ---
Created attachment 5690
--> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5690&action=edit
This message triggers the 'warn' as stated in this bug.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7798] Incorrect call to Encode::decode() in
Mail/SpamAssassin/Message.pm bails scanning of message.
Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7798
Giovanni Bechis <gi...@paclan.it> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |giovanni@paclan.it
--- Comment #5 from Giovanni Bechis <gi...@paclan.it> ---
I cannot reproduce with:
$ perl -MEncode::MIME::Header -e 'print $Encode::MIME::Header::VERSION'
2.28
$ spamassassin -V
SpamAssassin version 3.4.4
running on Perl version 5.30.1
Both Encode::MIME::Header 2.27 and 2.28 have a couple of fixes that could be
related.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7798] Incorrect call to Encode::decode() in
Mail/SpamAssassin/Message.pm bails scanning of message.
Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7798
Henrik Krohns <ap...@hege.li> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |apache@hege.li
--- Comment #1 from Henrik Krohns <ap...@hege.li> ---
Are you saying that the error appears only on this message and not all?
Are you sure Encode::MIME::Header module is installed?
perl -MEncode::MIME::Header -e 'print $Encode::MIME::Header::VERSION'
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 7798] Incorrect call to Encode::decode() in
Mail/SpamAssassin/Message.pm bails scanning of message.
Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7798
--- Comment #2 from Henrik Krohns <ap...@hege.li> ---
Encode::MIME::Header is part of Encode package and that 'MIME-Header' usage
works by default since ancient Perl. Your system is probably broken, try
reinstalling/upgrading the Encode package.
--
You are receiving this mail because:
You are the assignee for the bug.