------------------------------------------------------------
revno: 1268
committer: Mark Sapiro <[email protected]>
branch nick: 2.1
timestamp: Sat 2010-12-04 13:19:49 -0800
message:
   - Fixed a problem where an emailed command in the Subject: header with a
     non-ascii l10n of an 'Re:' prefix is ignored.  Bug #685261.
  
   - Fixed a problem with approving a post by email when the body of the
     approval mail is base64 encoded.  Bug #677115.
modified:
  Mailman/MailList.py
  Mailman/Queue/CommandRunner.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/MailList.py'
--- Mailman/MailList.py	2010-06-29 16:01:58 +0000
+++ Mailman/MailList.py	2010-12-04 21:19:49 +0000
@@ -1258,7 +1258,7 @@
                     except IndexError:
                         subpart = None
                     if subpart:
-                        s = StringIO(subpart.get_payload())
+                        s = StringIO(subpart.get_payload(decode=True))
                         while True:
                             line = s.readline()
                             if not line:
@@ -1267,8 +1267,8 @@
                                 continue
                             i = line.find(':')
                             if i > 0:
-                                if (line[:i].lower() == 'approve' or
-                                    line[:i].lower() == 'approved'):
+                                if (line[:i].strip().lower() == 'approve' or
+                                    line[:i].strip().lower() == 'approved'):
                                     # then
                                     approved = line[i+1:].strip()
                             break

=== modified file 'Mailman/Queue/CommandRunner.py'
--- Mailman/Queue/CommandRunner.py	2009-08-05 18:53:15 +0000
+++ Mailman/Queue/CommandRunner.py	2010-12-04 21:19:49 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2009 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2010 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
@@ -76,7 +76,8 @@
         try:
             subj = make_header(decode_header(subj)).__unicode__()
             # TK: Currently we don't allow 8bit or multibyte in mail command.
-            subj = subj.encode('us-ascii')
+            # MAS: However, an l10n 'Re:' may contain non-ascii so ignore it.
+            subj = subj.encode('us-ascii', 'ignore')
             # Always process the Subject: header first
             self.commands.append(subj)
         except (HeaderParseError, UnicodeError, LookupError):

=== modified file 'NEWS'
--- NEWS	2010-11-04 17:13:29 +0000
+++ NEWS	2010-12-04 21:19:49 +0000
@@ -13,6 +13,12 @@
 
   Bug Fixes and other patches
 
+    - Fixed a problem where an emailed command in the Subject: header with a
+      non-ascii l10n of an 'Re:' prefix is ignored.  Bug #685261.
+
+    - Fixed a problem with approving a post by email when the body of the
+      approval mail is base64 encoded.  Bug #677115.
+
     - Fixed the host name in the From: address of the owner notification from
       bin/add_members.  Bug #666181.
 

_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to