------------------------------------------------------------
revno: 1232
committer: Mark Sapiro <[email protected]>
branch nick: 2.1
timestamp: Fri 2010-04-09 13:17:07 -0700
message:
  We now accept/remove X-Approved: and X-Approve: headers in addition to
  Approved: and Approve: for pre-approving posts.  Bug ##557750.
modified:
  Mailman/Handlers/Approve.py
  Mailman/Handlers/Cleanse.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/Handlers/Approve.py'
--- Mailman/Handlers/Approve.py	2009-12-30 21:21:25 +0000
+++ Mailman/Handlers/Approve.py	2010-04-09 20:17:07 +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
@@ -61,7 +61,10 @@
     # because we want to discourage the practice of sending the site admin
     # password through email in the clear.
     missing = []
-    passwd = msg.get('approved', msg.get('approve', missing))
+    for hdr in ('approved', 'approve', 'x-approved', 'x-approve'):
+        passwd = msg.get(hdr, missing)
+        if passwd is not missing:
+            break
     if passwd is missing:
         # Find the first text/plain part in the message
         part = None
@@ -80,7 +83,11 @@
             if i >= 0:
                 name = line[:i]
                 value = line[i+1:]
-                if name.lower() in ('approve', 'approved'):
+                if name.lower() in ('approve',
+                                    'approved',
+                                    'x-approve',
+                                    'x-approved',
+                                    ):
                     passwd = value.lstrip()
                     # Now strip the first line from the payload so the
                     # password doesn't leak.

=== modified file 'Mailman/Handlers/Cleanse.py'
--- Mailman/Handlers/Cleanse.py	2009-08-01 19:14:32 +0000
+++ Mailman/Handlers/Cleanse.py	2010-04-09 20:17:07 +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
@@ -33,6 +33,9 @@
     del msg['approved']
     # Remove this one too.
     del msg['approve']
+    # And these too.
+    del msg['x-approved']
+    del msg['x-approve']
     # Also remove this header since it can contain a password
     del msg['urgent']
     # We remove other headers from anonymous lists

=== modified file 'NEWS'
--- NEWS	2010-03-29 20:48:11 +0000
+++ NEWS	2010-04-09 20:17:07 +0000
@@ -15,6 +15,9 @@
 
   Bug Fixes and other patches
 
+    - We now accept/remove X-Approved: and X-Approve: headers in addition to
+      Approved: and Approve: for pre-approving posts.  Bug ##557750.
+
     - Reordered the 'cancel' and 'subscribe' buttons on the subscription
       confirmation web page so the default action upon 'enter' will be the
       subscribe button in browsers that pick the first button.  Bug #530654.

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

Reply via email to