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 2011/05/07 15:28:06 UTC

[Bug 6583] get_content_preview should be safe

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6583

Henrik Krohns <he...@hege.li> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hege@hege.li

--- Comment #1 from Henrik Krohns <he...@hege.li> 2011-05-07 13:28:06 UTC ---
Any objections? Or change it to just very bad control characters?

--- lib/Mail/SpamAssassin/PerMsgStatus.pm (revision 1100366)
+++ lib/Mail/SpamAssassin/PerMsgStatus.pm (working copy)
@@ -619,6 +619,9 @@
   $str =~ s/[-_\*\.]{10,}//gs;
   $str =~ s/\s+/ /gs;

+  # Bug 6583: it's supposed to be "safe", so replace unprintable with ?
+  $str =~ s/[^[:print:]]/?/gs;
+
   # add "Content preview:" ourselves, so that the text aligns
   # correctly with the template -- then trim it off.  We don't
   # have to get this *exactly* right, but it's nicer if we

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.