------------------------------------------------------------
revno: 1215
committer: Mark Sapiro <[email protected]>
branch nick: 2.1
timestamp: Wed 2009-12-30 13:21:25 -0800
message:
  Fixed a bug where a message with an Approved: header held by a handler
  that precedes Approve (SpamDetect by default) would not have the
  Approved: header removed if the held message was approved.  Bug #501739.
modified:
  Mailman/Handlers/Approve.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	2007-06-09 19:30:36 +0000
+++ Mailman/Handlers/Approve.py	2009-12-30 21:21:25 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2007 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2009 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
@@ -43,11 +43,17 @@
 
 def process(mlist, msg, msgdata):
     # Short circuits
-    if msgdata.get('approved'):
+    # Do not short circuit. The problem is SpamDetect comes before Approve.
+    # Suppose a message with an Approved: header is held by SpamDetect (or
+    # any other handler that might come before Approve) and then approved
+    # by a moderator. When the approved message reaches Approve in the
+    # pipeline, we still need to remove the Approved: (pseudo-)header, so
+    # we can't short circuit.
+    #if msgdata.get('approved'):
         # Digests, Usenet postings, and some other messages come pre-approved.
         # TBD: we may want to further filter Usenet messages, so the test
         # above may not be entirely correct.
-        return
+        #return
     # See if the message has an Approved or Approve header with a valid
     # list-moderator, list-admin.  Also look at the first non-whitespace line
     # in the file to see if it looks like an Approved header.  We are

=== modified file 'NEWS'
--- NEWS	2009-12-28 21:35:12 +0000
+++ NEWS	2009-12-30 21:21:25 +0000
@@ -11,6 +11,12 @@
     - Changed a few DOCTYPE directives in templates for compliance.
       Bug #500952 and Bug #500955.
 
+  Bug Fixes and other patches
+
+    - Fixed a bug where a message with an Approved: header held by a handler
+      that precedes Approve (SpamDetect by default) would not have the
+      Approved: header removed if the held message was approved.  Bug #501739.
+
 2.1.13 (22-Dec-2009)
 
   i18n

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

Reply via email to