aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2009-12-30 13:21:25 -0800
committerMark Sapiro <mark@msapiro.net>2009-12-30 13:21:25 -0800
commit30ed3639227be2b174be06d69a43ba73cd205422 (patch)
treec8535bff22d39db55710b69d0b86e008e9081f97 /Mailman/Handlers
parent4ef7cc0b5e77ddc6332e7712260810afc6809b83 (diff)
downloadmailman2-30ed3639227be2b174be06d69a43ba73cd205422.tar.gz
mailman2-30ed3639227be2b174be06d69a43ba73cd205422.tar.xz
mailman2-30ed3639227be2b174be06d69a43ba73cd205422.zip
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.
Diffstat (limited to 'Mailman/Handlers')
-rw-r--r--Mailman/Handlers/Approve.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/Mailman/Handlers/Approve.py b/Mailman/Handlers/Approve.py
index 7e962c67..9e7da910 100644
--- a/Mailman/Handlers/Approve.py
+++ b/Mailman/Handlers/Approve.py
@@ -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 @@ NL = '\n'
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