[Pkg-mailman-hackers] Pkg-mailman commit - rev 268 - in
trunk/debian: . patches
Lionel Elie Mamane
lmamane at costa.debian.org
Sun Jan 29 16:23:45 UTC 2006
Author: lmamane
Date: 2006-01-29 16:23:45 +0000 (Sun, 29 Jan 2006)
New Revision: 268
Added:
trunk/debian/patches/02_stolen_from_upstream_CVS.dpatch
Modified:
trunk/debian/changelog
trunk/debian/patches/00list
Log:
Apply bugfix patch recommended by Tokio Kikuchi
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2006-01-29 16:17:31 UTC (rev 267)
+++ trunk/debian/changelog 2006-01-29 16:23:45 UTC (rev 268)
@@ -9,6 +9,7 @@
68_translation_update_nl.dpatch
- Drop patches merged upstream:
60_french_archtocentry
+ * Pull fixes from various bugs from upstream CVS
-- Lionel Elie Mamane <lmamane at debian.org> Sun, 29 Jan 2006 17:16:09 +0100
Modified: trunk/debian/patches/00list
===================================================================
--- trunk/debian/patches/00list 2006-01-29 16:17:31 UTC (rev 267)
+++ trunk/debian/patches/00list 2006-01-29 16:23:45 UTC (rev 268)
@@ -1,5 +1,6 @@
00_stolen_from_HEAD
01_defaults.debian
+02_stolen_from_upstream_CVS
07_snooze
10_wrapper_uid
11_handle_propfind
Added: trunk/debian/patches/02_stolen_from_upstream_CVS.dpatch
===================================================================
--- trunk/debian/patches/02_stolen_from_upstream_CVS.dpatch 2006-01-29 16:17:31 UTC (rev 267)
+++ trunk/debian/patches/02_stolen_from_upstream_CVS.dpatch 2006-01-29 16:23:45 UTC (rev 268)
@@ -0,0 +1,172 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_stolen_from_upstream.dpatch by <lionel at mamane.lu>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Taken from http://sourceforge.net/tracker/index.php?func=detail&aid=1405790&group_id=103&atid=300103
+## DP: Mailman 2.1.7 multiple patch
+## DP: After the release of Mailman 2.1.7, a few bugs are
+## DP: found in a couple of weeks. We are planning to release
+## DP: 2.1.8 near future, but in the mean time, please apply
+## DP: this patch. It fixes bugs 1400128, 1395683, 1194419,
+## DP: http://mail.python.org/pipermail/mailman-users/2006-January/048573.html
+## DP: (SpamDetect loop) and few others.
+
+ at DPATCH@
+diff -urNad mailman-2.1.7~/Mailman/Archiver/HyperArch.py mailman-2.1.7/Mailman/Archiver/HyperArch.py
+--- mailman-2.1.7~/Mailman/Archiver/HyperArch.py 2006-01-29 17:11:56.000000000 +0100
++++ mailman-2.1.7/Mailman/Archiver/HyperArch.py 2006-01-29 17:19:57.793320007 +0100
+@@ -569,16 +569,21 @@
+ if d['_message_id']:
+ headers.append('Message-ID: %(_message_id)s')
+ body = EMPTYSTRING.join(self.body)
+- if isinstance(body, types.UnicodeType):
+- body = body.encode(Utils.GetCharSet(self._lang), 'replace')
++ cset = Utils.GetCharSet(self._lang)
++ # Coerce the body to Unicode and replace any invalid characters.
++ if not isinstance(body, types.UnicodeType):
++ body = unicode(body, cset, 'replace')
+ if mm_cfg.ARCHIVER_OBSCURES_EMAILADDRS:
+ otrans = i18n.get_translation()
+ try:
++ atmark = unicode(_(' at '), cset)
+ i18n.set_language(self._lang)
+ body = re.sub(r'([-+,.\w]+)@([-+.\w]+)',
+- '\g<1>' + _(' at ') + '\g<2>', body)
++ '\g<1>' + atmark + '\g<2>', body)
+ finally:
+ i18n.set_translation(otrans)
++ # Return body to character set of article.
++ body = body.encode(cset, 'replace')
+ return NL.join(headers) % d + '\n\n' + body + '\n'
+
+ def _set_date(self, message):
+diff -urNad mailman-2.1.7~/Mailman/Bouncers/SimpleMatch.py mailman-2.1.7/Mailman/Bouncers/SimpleMatch.py
+--- mailman-2.1.7~/Mailman/Bouncers/SimpleMatch.py 2005-08-27 03:40:15.000000000 +0200
++++ mailman-2.1.7/Mailman/Bouncers/SimpleMatch.py 2006-01-29 17:19:57.794319867 +0100
+@@ -1,4 +1,4 @@
+-# Copyright (C) 1998-2003 by the Free Software Foundation, Inc.
++# Copyright (C) 1998-2006 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
+@@ -12,7 +12,8 @@
+ #
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
++# USA.
+
+ """Recognizes simple heuristically delimited bounces."""
+
+@@ -74,6 +75,10 @@
+ (_c('This message was created automatically by mail delivery'),
+ _c('^---- START OF RETURNED MESSAGE ----'),
+ _c("addressed to '(?P<addr>[^']*)'")),
++ # Prodigy.net full mailbox
++ (_c("User's mailbox is full:"),
++ _c('Unable to deliver mail.'),
++ _c("User's mailbox is full:\s*<(?P<addr>.*)>.*$")),
+ # Next one goes here...
+ ]
+
+diff -urNad mailman-2.1.7~/Mailman/Cgi/edithtml.py mailman-2.1.7/Mailman/Cgi/edithtml.py
+--- mailman-2.1.7~/Mailman/Cgi/edithtml.py 2005-12-30 19:50:07.000000000 +0100
++++ mailman-2.1.7/Mailman/Cgi/edithtml.py 2006-01-29 17:19:57.794319867 +0100
+@@ -1,4 +1,4 @@
+-# Copyright (C) 1998-2005 by the Free Software Foundation, Inc.
++# Copyright (C) 1998-2006 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
+@@ -20,6 +20,7 @@
+ import os
+ import cgi
+ import errno
++import re
+
+ from Mailman import Utils
+ from Mailman import MailList
+diff -urNad mailman-2.1.7~/Mailman/Gui/Topics.py mailman-2.1.7/Mailman/Gui/Topics.py
+--- mailman-2.1.7~/Mailman/Gui/Topics.py 2005-08-27 03:40:15.000000000 +0200
++++ mailman-2.1.7/Mailman/Gui/Topics.py 2006-01-29 17:19:57.794319867 +0100
+@@ -91,6 +91,9 @@
+ ]
+
+ def handleForm(self, mlist, category, subcat, cgidata, doc):
++ # MAS: Did we come from the authentication page?
++ if not cgidata.has_key('topic_box_01'):
++ return
+ topics = []
+ # We start i at 1 and keep going until we no longer find items keyed
+ # with the marked tags.
+diff -urNad mailman-2.1.7~/Mailman/Handlers/CookHeaders.py mailman-2.1.7/Mailman/Handlers/CookHeaders.py
+--- mailman-2.1.7~/Mailman/Handlers/CookHeaders.py 2005-12-30 19:50:08.000000000 +0100
++++ mailman-2.1.7/Mailman/Handlers/CookHeaders.py 2006-01-29 17:19:57.795319727 +0100
+@@ -193,10 +193,9 @@
+ # We always add a List-ID: header.
+ del msg['list-id']
+ msg['List-Id'] = listid_h
+- # For internally crafted messages, we
+- # also add a (nonstandard), "X-List-Administrivia: yes" header. For all
+- # others (i.e. those coming from list posts), we adda a bunch of other RFC
+- # 2369 headers.
++ # For internally crafted messages, we also add a (nonstandard),
++ # "X-List-Administrivia: yes" header. For all others (i.e. those coming
++ # from list posts), we add a bunch of other RFC 2369 headers.
+ requestaddr = mlist.GetRequestEmail()
+ subfieldfmt = '<%s>, <mailto:%s?subject=%ssubscribe>'
+ listinfo = mlist.GetScriptURL('listinfo', absolute=1)
+diff -urNad mailman-2.1.7~/Mailman/Handlers/SpamDetect.py mailman-2.1.7/Mailman/Handlers/SpamDetect.py
+--- mailman-2.1.7~/Mailman/Handlers/SpamDetect.py 2005-12-31 07:15:33.000000000 +0100
++++ mailman-2.1.7/Mailman/Handlers/SpamDetect.py 2006-01-29 17:19:57.810317623 +0100
+@@ -1,4 +1,4 @@
+-# Copyright (C) 1998-2005 by the Free Software Foundation, Inc.
++# Copyright (C) 1998-2006 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
+@@ -92,8 +92,7 @@
+
+
+ def process(mlist, msg, msgdata):
+- if msgdata.get('approved') or msgdata.get('reduced_list_headers'):
+- # TK: 'reduced_list_headers' is intenally crafted message (virgin).
++ if msgdata.get('approved'):
+ return
+ # First do site hard coded header spam checks
+ for header, regex in mm_cfg.KNOWN_SPAMMERS:
+@@ -103,20 +102,23 @@
+ if mo:
+ # we've detected spam, so throw the message away
+ raise SpamDetected
++ # Before we go to header_filter_rules, we exclude internally generated
++ # owner notification from checking, because 1) we collect headers from
++ # all the attachments but this will cause matching the filter rule again,
++ # and 2) list owners may want to check header name / value pair like
++ # 'Precedence: bulk' which is also generated by mailman. Both will
++ # cause loop of holding owner notification messages if the action is
++ # set to 'hold'.
++ if msgdata.get('toowner') and msg.get('x-list-administrivia') == 'yes':
++ return
+ # Now do header_filter_rules
+ # TK: Collect headers in sub-parts because attachment filename
+ # extension may be a clue to possible virus/spam.
+- if msg.is_multipart():
+- headers = ''
+- for p in msg.walk():
+- g = HeaderGenerator(StringIO())
+- g.flatten(p)
+- headers += g.header_text()
+- else:
+- # Only the top level header should be checked.
++ headers = ''
++ for p in msg.walk():
+ g = HeaderGenerator(StringIO())
+- g.flatten(msg)
+- headers = g.header_text()
++ g.flatten(p)
++ headers += g.header_text()
+ # Now reshape headers (remove extra CR and connect multiline).
+ headers = re.sub('\n+', '\n', headers)
+ headers = re.sub('\n\s', ' ', headers)
Property changes on: trunk/debian/patches/02_stolen_from_upstream_CVS.dpatch
___________________________________________________________________
Name: svn:executable
+ *
More information about the Pkg-mailman-hackers
mailing list