------------------------------------------------------------
revno: 1019
committer: Mark Sapiro <[EMAIL PROTECTED]>
branch nick: 2.2
timestamp: Sun 2008-12-07 11:49:42 -0800
message:
Merged changes from the 2.1 branch.
modified:
Mailman/Cgi/roster.py
Mailman/Handlers/Decorate.py
NEWS
------------------------------------------------------------
revno: 984.1.163
committer: Mark Sapiro <[EMAIL PROTECTED]>
branch nick: 2.1
timestamp: Sun 2008-12-07 09:41:12 -0800
message:
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.
Made a minor change to the authentication logic for displaying hidden
members on the roster.
modified:
Mailman/Cgi/roster.py
Mailman/Handlers/Decorate.py
NEWS
=== modified file 'Mailman/Cgi/roster.py'
--- a/Mailman/Cgi/roster.py 2007-05-08 03:16:04 +0000
+++ b/Mailman/Cgi/roster.py 2008-12-07 17:41:12 +0000
@@ -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 @@
# 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,
=== modified file 'Mailman/Handlers/Decorate.py'
--- a/Mailman/Handlers/Decorate.py 2008-12-03 01:11:33 +0000
+++ b/Mailman/Handlers/Decorate.py 2008-12-07 19:49:42 +0000
@@ -98,8 +98,16 @@
# 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''
=== modified file 'NEWS'
--- a/NEWS 2008-12-05 23:27:40 +0000
+++ b/NEWS 2008-12-07 19:49:42 +0000
@@ -87,6 +87,10 @@
- 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
--
Active development version (web u/i update)
https://code.launchpad.net/~mailman-coders/mailman/2.2
You are receiving this branch notification because you are subscribed to it.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org