diff options
Diffstat (limited to '')
-rw-r--r-- | Mailman/Handlers/SpamDetect.py | 8 | ||||
-rwxr-xr-x | NEWS | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/Mailman/Handlers/SpamDetect.py b/Mailman/Handlers/SpamDetect.py index 8d26da03..9e01f623 100644 --- a/Mailman/Handlers/SpamDetect.py +++ b/Mailman/Handlers/SpamDetect.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2012 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2013 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -27,6 +27,7 @@ TBD: This needs to be made more configurable and robust. import re +from email.Errors import HeaderParseError from email.Header import decode_header from Mailman import mm_cfg @@ -68,7 +69,10 @@ def getDecodedHeaders(msg, cset='utf-8'): headers = '' for h, v in msg.items(): uvalue = u'' - v = decode_header(re.sub('\n\s', ' ', v)) + try: + v = decode_header(re.sub('\n\s', ' ', v)) + except HeaderParseError: + v = [(v, 'us-ascii')] for frag, cs in v: if not cs: cs = 'us-ascii' @@ -83,6 +83,9 @@ Here is a history of user visible changes to Mailman. Bug Fixes and other patches + - Fixed a crash in SpamDetect.py which caused messages with unparseable + RFC 2047 encoded headers to be shunted. (LP: #1235101) + - Fixed cron/disabled to send a fresh cookie when notifying disabled members. (LP: #1203200) |