Bug 3373 - Content preview with garbage characters (including \0)
Summary: Content preview with garbage characters (including \0)
Status: RESOLVED WORKSFORME
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: spamassassin (show other bugs)
Version: 2.63
Hardware: PC Windows XP
: P5 normal
Target Milestone: Future
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-11 14:24 UTC by Mikko Noromaa
Modified: 2006-06-27 10:38 UTC (History)
1 user (show)



Attachment Type Modified Status Actions Submitter/CLA Status
Test mail text/plain None Mikko Noromaa [NoCLA]
New test case text/plain None Mikko Noromaa [NoCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Mikko Noromaa 2004-05-11 14:24:45 UTC
SpamAssassin returns some garbage characters in the Content preview section of 
the attached email. Note that you may have to run the test mail with the --
test-mode switch to see the report.

The garbage characters include a zero character (\0) which confuses some 
programs that interpret it as a string null-terminator!
Comment 1 Mikko Noromaa 2004-05-11 14:25:17 UTC
Created attachment 1949 [details]
Test mail
Comment 2 Theo Van Dinter 2004-05-11 15:07:56 UTC
Subject: Re:  New: Content preview with garbage characters (including \0)

On Tue, May 11, 2004 at 02:24:46PM -0700, bugzilla-daemon@bugzilla.spamassassin.org wrote:
> SpamAssassin returns some garbage characters in the Content preview section of 
> the attached email. Note that you may have to run the test mail with the --
> test-mode switch to see the report.

works fine for me.

Content preview:  W32.Klez.E is a very dangerous virus that spread
  through email. Symantec give you the very W32.Klez.E removal tools For
  more information,please visit http://www.Symantec.com [skipped
  plain/text attachment] [...]

No nulls anywhere in the output message.

Comment 3 Mikko Noromaa 2004-05-11 15:53:25 UTC
I get the following (pasted directly from the command prompt window):

Content preview:  ↔3 ∟@♥³q  ‼âW32.Klez.E is a very dangerous virus that
  spread through email. Symantec give you the very W32.Klez.E removal
  tools nFor more information,please visit http://www.Symantec.comNorton
  AntiVirus removed the attachment: install.exe. The W32.Klez.H@mm threat
  was detected in the attachment.[skipped application/octet-stream
  attachment] [...]

spamassassin --version reports:

SpamAssassin version 2.63

perl -v reports:

This is perl, v5.8.3 built for MSWin32-x86-multi-thread
(with 8 registered patches, see perl -V for more detail)

Copyright 1987-2003, Larry Wall

Binary build 809 provided by ActiveState Corp. http://www.ActiveState.com
ActiveState is a division of Sophos.
Built Feb  3 2004 00:28:51
Comment 4 Daniel Quinlan 2004-05-11 17:38:40 UTC
Subject: Re:  Content preview with garbage characters (including \0)

Hmmm... I can't reproduce this with 2.6x-cvs to be sure that 3.0 fixes
this (neither 2.63-cvs nor 3.0-svn has the problem for me).

Would it be possible for you to try to reproduce it with our 3.0 tree
from SVN?

Comment 5 Sidney Markowitz 2004-05-11 18:05:37 UTC
Mikko, try downloading the attachment that you uploaded to bugzilla and see if
you get the same result from that file. Perhaps the garbage characters did not
survive the upload as a text attachment.

If that makes a difference, try making a zip file of the message and upload that
as an attachment to the bug report.
Comment 6 Mikko Noromaa 2004-05-12 02:19:31 UTC
Ah, it seems like one of my own fixes causes this discrepancy in results! I 
upload a new testfile that is modified so that it returns the garbage 
characters on an unmodified installation (still just 2.63).

My earlier fix is reported in http://bugzilla.spamassassin.org/show_bug.cgi?
id=3350. It may be related in that the attachment created by Norton AntiVirus 
is bad in many respects. Anyway, I think SpamAssassin should always strip at 
least the zero characters from its output.
Comment 7 Mikko Noromaa 2004-05-12 02:20:16 UTC
Created attachment 1950 [details]
New test case
Comment 8 Daniel Quinlan 2004-11-18 21:59:04 UTC
SA should just QP encode and leave the text alone.  If an MUA can't handle
nulls, sorry.

Daniel
Comment 9 Daniel Quinlan 2005-03-30 01:08:56 UTC
move bug to Future milestone (previously set to Future -- I hope)
Comment 10 Theo Van Dinter 2006-06-27 17:38:41 UTC
ancient