aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Sapiro <msapiro@value.net>2012-09-06 16:58:03 -0700
committerMark Sapiro <msapiro@value.net>2012-09-06 16:58:03 -0700
commite9c0ea3f5bf29a9a039c132b0626ba2af4c8d802 (patch)
treec077caec3d822d6613ce1f1947d41d8a8be9fc94
parentbaa86ef21a9a242ed61e99547716ed7b3b12a7df (diff)
downloadmailman2-e9c0ea3f5bf29a9a039c132b0626ba2af4c8d802.tar.gz
mailman2-e9c0ea3f5bf29a9a039c132b0626ba2af4c8d802.tar.xz
mailman2-e9c0ea3f5bf29a9a039c132b0626ba2af4c8d802.zip
Fixed a bug where non-ascii characters in the real name in a subscription
request could throw a UnicodeEncodeError upon subscription approval and perhaps in other situations too. (LP: 1047100)
Diffstat (limited to '')
-rw-r--r--Mailman/Logging/Syslog.py4
-rw-r--r--NEWS4
2 files changed, 8 insertions, 0 deletions
diff --git a/Mailman/Logging/Syslog.py b/Mailman/Logging/Syslog.py
index 531ab1d7..81e27214 100644
--- a/Mailman/Logging/Syslog.py
+++ b/Mailman/Logging/Syslog.py
@@ -62,6 +62,10 @@ class _Syslog:
logf.write(msg + '\n')
except UnicodeError:
# Python 2.4 may fail to write 8bit (non-ascii) characters
+ # Also, if msg is unicode with non-ascii, quopri.encodestring()
+ # will throw UnicodeEncodeError, so avoid that.
+ if isinstance(msg, unicode):
+ msg = msg.encode('iso-8859-1', 'replace')
logf.write(quopri.encodestring(msg) + '\n')
# For the ultimate in convenience
diff --git a/NEWS b/NEWS
index dfe8843f..41b9ce27 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,10 @@ Here is a history of user visible changes to Mailman.
Bug Fixes and other patches
+ - Fixed a bug where non-ascii characters in the real name in a subscription
+ request could throw a UnicodeEncodeError upon subscription approval and
+ perhaps in other situations too. (LP: 1047100)
+
- The query fragments send_unsub_notifications_to_list_owner and
send_unsub_ack_to_this_batch will now assume default values if not set
in mass unsubscribe URLs. (LP: #1032378)