------------------------------------------------------------
revno: 1204
committer: Mark Sapiro <[email protected]>
branch nick: 2.2
timestamp: Sat 2011-12-31 14:25:00 -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.2
https://code.launchpad.net/~mailman-coders/mailman/2.2
Your team Mailman Checkins is subscribed to branch lp:mailman/2.2.
To unsubscribe from this branch go to
https://code.launchpad.net/~mailman-coders/mailman/2.2/+edit-subscription
=== modified file 'Mailman/Cgi/admindb.py'
--- Mailman/Cgi/admindb.py 2011-05-11 01:59:39 +0000
+++ Mailman/Cgi/admindb.py 2011-12-31 22:25:00 +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:27:31 +0000
+++ NEWS 2011-12-31 22:25:00 +0000
@@ -129,6 +129,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
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org