aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Mailman/Cgi/roster.py14
-rw-r--r--Mailman/Handlers/Decorate.py12
-rw-r--r--NEWS4
3 files changed, 22 insertions, 8 deletions
diff --git a/Mailman/Cgi/roster.py b/Mailman/Cgi/roster.py
index b53e5912..8d06777d 100644
--- a/Mailman/Cgi/roster.py
+++ b/Mailman/Cgi/roster.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2007 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2008 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
@@ -72,16 +72,18 @@ def main():
# that, we check roster-email and roster-pw fields for a valid password.
# (also allowed: the list moderator, the list admin, and the site admin).
password = cgidata.getvalue('roster-pw', '')
- list_hidden = mlist.WebAuthenticate((mm_cfg.AuthListModerator,
- mm_cfg.AuthListAdmin,
- mm_cfg.AuthSiteAdmin),
- password)
+ addr = cgidata.getvalue('roster-email', '')
+ list_hidden = (not mlist.WebAuthenticate((mm_cfg.AuthUser,),
+ password, addr)
+ and mlist.WebAuthenticate((mm_cfg.AuthListModerator,
+ mm_cfg.AuthListAdmin,
+ mm_cfg.AuthSiteAdmin),
+ password))
if mlist.private_roster == 0:
# No privacy
ok = 1
elif mlist.private_roster == 1:
# Members only
- addr = cgidata.getvalue('roster-email', '')
ok = mlist.WebAuthenticate((mm_cfg.AuthUser,
mm_cfg.AuthListModerator,
mm_cfg.AuthListAdmin,
diff --git a/Mailman/Handlers/Decorate.py b/Mailman/Handlers/Decorate.py
index fa6c3a80..4a6fb8aa 100644
--- a/Mailman/Handlers/Decorate.py
+++ b/Mailman/Handlers/Decorate.py
@@ -98,8 +98,16 @@ def process(mlist, msg, msgdata):
# TK: Try to keep the message plain by converting the header/
# footer/oldpayload into unicode and encode with mcset/lcset.
# Try to decode qp/base64 also.
- uheader = unicode(header, lcset, 'ignore')
- ufooter = unicode(footer, lcset, 'ignore')
+ # It is possible header/footer is already unicode if it was
+ # interpolated with a unicode.
+ if isinstance(header, unicode):
+ uheader = header
+ else:
+ uheader = unicode(header, lcset, 'ignore')
+ if isinstance(footer, unicode):
+ ufooter = footer
+ else:
+ ufooter = unicode(footer, lcset, 'ignore')
try:
oldpayload = unicode(msg.get_payload(decode=True), mcset)
frontsep = endsep = u''
diff --git a/NEWS b/NEWS
index 4fdc03d2..35f5d3ae 100644
--- a/NEWS
+++ b/NEWS
@@ -46,6 +46,10 @@ Here is a history of user visible changes to Mailman.
- Fixed an issue that prevented editing the options.html template from
the web admin interface. SF Bug #2164798.
+ - Fixed a problem in Decorate which could throw a TypeError on conversion
+ to unicode of a header/footer that was already unicode because of
+ interpolating a unicode value.
+
2.1.11 (30-Jun-2008)
New Features