------------------------------------------------------------ revno: 1336 committer: Mark Sapiro <msap...@value.net> branch nick: 2.1 timestamp: Sat 2011-12-31 14:22:39 -0800 message: Fix for bug #629738 could cause a crash in the admindb details display if the decoded message body contained characters not in the character set of the list's preferred language. Fixed. Bug #910440. modified: Mailman/Cgi/admindb.py NEWS
-- lp:mailman/2.1 https://code.launchpad.net/~mailman-coders/mailman/2.1 Your team Mailman Checkins is subscribed to branch lp:mailman/2.1. To unsubscribe from this branch go to https://code.launchpad.net/~mailman-coders/mailman/2.1/+edit-subscription
=== modified file 'Mailman/Cgi/admindb.py' --- Mailman/Cgi/admindb.py 2011-05-11 01:57:55 +0000 +++ Mailman/Cgi/admindb.py 2011-12-31 22:22:39 +0000 @@ -632,6 +632,8 @@ body = EMPTYSTRING.join(lines) # Get message charset and try encode in list charset # We get it from the first text part. + # We need to replace invalid characters here or we can throw an uncaught + # exception in doc.Format(). for part in msg.walk(): if part.get_content_maintype() == 'text': # Watchout for charset= with no value. @@ -642,7 +644,7 @@ lcset = Utils.GetCharSet(mlist.preferred_language) if mcset <> lcset: try: - body = unicode(body, mcset).encode(lcset) + body = unicode(body, mcset).encode(lcset, 'replace') except (LookupError, UnicodeError, ValueError): pass hdrtxt = NL.join(['%s: %s' % (k, v) for k, v in msg.items()]) === modified file 'NEWS' --- NEWS 2011-12-25 17:25:47 +0000 +++ NEWS 2011-12-31 22:22:39 +0000 @@ -73,6 +73,10 @@ Bug Fixes and other patches + - Fix for bug #629738 could cause a crash in the admindb details display + if the decoded message body contained characters not in the character + set of the list's preferred language. Fixed. Bug #910440. + - Added recognition for another Qmail bounce format. - Fixed an erroneous seek in the Mailman.Mailbox.Mailbox.AppendMessage
_______________________________________________ Mailman-checkins mailing list Mailman-checkins@python.org Unsubscribe: http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org