[Mailman-checkins] [Branch ~mailman-coders/mailman/3.0]

2007-11-06 Thread noreply

revno: 6573
committer: Mark Sapiro [EMAIL PROTECTED]
branch nick: 3.0
timestamp: Tue 2007-11-06 18:03:28 -0800
message:
  - Scrubber.py
Fixed an issue where an implicit text/plain part without any headers gets
lost.
  
Moved the cleansing of the filename extension to a place where it is
guaranteed to be a string as opposed to an empty list.
modified:
  Mailman/Handlers/Scrubber.py

=== modified file 'Mailman/Handlers/Scrubber.py'
--- a/Mailman/Handlers/Scrubber.py  2007-10-31 21:38:51 +
+++ b/Mailman/Handlers/Scrubber.py  2007-11-07 02:03:28 +
@@ -46,7 +46,7 @@
 # Path characters for common platforms
 pre = re.compile(r'[/\\:]')
 # All other characters to strip out of Content-Disposition: filenames
-# (essentially anything that isn't an alphanum, dot, slash, or underscore.
+# (essentially anything that isn't an alphanum, dot, dash, or underscore).
 sre = re.compile(r'[^-\w.]')
 # Regexp to strip out leading dots
 dre = re.compile(r'^\.*')
@@ -265,7 +265,7 @@
 # If the message isn't a multipart, then we'll strip it out as an
 # attachment that would have to be separately downloaded.  Pipermail
 # will transform the url into a hyperlink.
-elif part and not part.is_multipart():
+elif part._payload and not part.is_multipart():
 payload = part.get_payload(decode=True)
 ctype = part.get_content_type()
 # XXX Under email 2.5, it is possible that payload will be None.
@@ -313,7 +313,8 @@
 charsets = []
 for part in msg.walk():
 # TK: bug-id 1099138 and multipart
-if not part or part.is_multipart():
+# MAS test payload - if part may fail if there are no headers.
+if not part._payload or part.is_multipart():
 continue
 # All parts should be scrubbed to text/plain by now.
 partctype = part.get_content_type()
@@ -410,8 +411,6 @@
 ext = fnext or guess_extension(ctype, fnext)
 else:
 ext = guess_extension(ctype, fnext)
-# Allow only alphanumerics, dash, underscore, and dot
-ext = sre.sub('', ext)
 if not ext:
 # We don't know what it is, so assume it's just a shapeless
 # application/octet-stream, unless the Content-Type: is
@@ -421,6 +420,8 @@
 ext = '.txt'
 else:
 ext = '.bin'
+# Allow only alphanumerics, dash, underscore, and dot
+ext = sre.sub('', ext)
 path = None
 # We need a lock to calculate the next attachment number
 with Lock(os.path.join(fsdir, 'attachments.lock')):



--

https://code.launchpad.net/~mailman-coders/mailman/3.0

You are receiving this branch notification because you are subscribed to it.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/3.0/+subscription/mailman-checkins.
___
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org



[Mailman-checkins] [Branch ~mailman-coders/mailman/2.1]

2007-11-06 Thread noreply

revno: 1001
committer: Mark Sapiro [EMAIL PROTECTED]
branch nick: 2.1
timestamp: Sun 2007-11-04 14:07:28 -0800
message:
  Changed the descriptions of the ARCHIVE_TO_MBOX settings to more
  accurately represent their current meaning.
modified:
  Mailman/Defaults.py.in

=== modified file 'Mailman/Defaults.py.in'
--- a/Mailman/Defaults.py.in2007-05-08 03:16:04 +
+++ b/Mailman/Defaults.py.in2007-11-04 22:07:28 +
@@ -217,11 +217,13 @@
 # ARCHIVE_TO_MBOX
 #-1 - do not do any archiving
 # 0 - do not archive to mbox, use builtin mailman html archiving only
-# 1 - archive to mbox to use an external archiving mechanism only
-# 2 - archive to both mbox and builtin mailman html archiving -
-# use this to make both external archiving mechanism work and
-# mailman's builtin html archiving.  the flat mail file can be
-# useful for searching, external archivers, etc.
+# 1 - do not use builtin mailman html archiving, archive to mbox only
+# 2 - archive to both mbox and builtin mailman html archiving.
+# See the settings below for PUBLIC_EXTERNAL_ARCHIVER and
+# PRIVATE_EXTERNAL_ARCHIVER which can be used to replace mailman's
+# builtin html archiving with an external archiver.  The flat mail
+# mbox file can be useful for searching, and is another way to
+# interface external archivers, etc.
 ARCHIVE_TO_MBOX = 2
 
 # 0 - yearly



--

https://code.launchpad.net/~mailman-coders/mailman/2.1

You are receiving this branch notification because you are subscribed to it.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+subscription/mailman-checkins.
___
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org



[Mailman-checkins] [Branch ~mailman-coders/mailman/2.1]

2007-11-06 Thread noreply

revno: 1003
committer: Mark Sapiro [EMAIL PROTECTED]
branch nick: 2.1
timestamp: Sun 2007-11-04 15:03:38 -0800
message:
  - Cgi/options.py - fixed to not present the empty topic to user.
  - Handlers/CalcRecips.py - Changed to not process topics if topics
are disabled for the list.
modified:
  Mailman/Cgi/options.py
  Mailman/Handlers/CalcRecips.py

=== modified file 'Mailman/Cgi/options.py'
--- a/Mailman/Cgi/options.py2006-08-30 14:54:22 +
+++ b/Mailman/Cgi/options.py2007-11-04 23:03:38 +
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2006 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2007 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
@@ -797,6 +797,8 @@
 if mlist.topics:
 table = Table(border=0)
 for name, pattern, description, emptyflag in mlist.topics:
+if emptyflag:
+continue
 quotedname = urllib.quote_plus(name)
 details = Link(mlist.GetScriptURL('options') +
'/%s/?VARHELP=%s' % (user, quotedname),

=== modified file 'Mailman/Handlers/CalcRecips.py'
--- a/Mailman/Handlers/CalcRecips.py2005-08-27 01:40:17 +
+++ b/Mailman/Handlers/CalcRecips.py2007-11-04 23:03:38 +
@@ -1,4 +1,4 @@
-# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2007 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.
 
 Calculate the regular (i.e. non-digest) recipients of the message.
 
@@ -91,6 +92,10 @@
 
 
 def do_topic_filters(mlist, msg, msgdata, recips):
+if not mlist.topics_enabled:
+# MAS: if topics are currently disabled for the list, send to all
+# regardless of ReceiveNonmatchingTopics
+return
 hits = msgdata.get('topichits')
 zaprecips = []
 if hits:



--

https://code.launchpad.net/~mailman-coders/mailman/2.1

You are receiving this branch notification because you are subscribed to it.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+subscription/mailman-checkins.
___
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org



[Mailman-checkins] [Branch ~mailman-coders/mailman/2.1]

2007-11-06 Thread noreply

revno: 1005
committer: Mark Sapiro [EMAIL PROTECTED]
branch nick: 2.1
timestamp: Tue 2007-11-06 17:41:17 -0800
message:
  - Scrubber.py
Fixed an issue where an implicit text/plain part without any headers gets
lost.
  
Moved the cleansing of the filename extension to a place where it is
guaranteed to be a string as opposed to an empty list.
modified:
  Mailman/Handlers/Scrubber.py

=== modified file 'Mailman/Handlers/Scrubber.py'
--- a/Mailman/Handlers/Scrubber.py  2007-06-22 17:49:27 +
+++ b/Mailman/Handlers/Scrubber.py  2007-11-07 01:41:17 +
@@ -45,7 +45,7 @@
 # Path characters for common platforms
 pre = re.compile(r'[/\\:]')
 # All other characters to strip out of Content-Disposition: filenames
-# (essentially anything that isn't an alphanum, dot, slash, or underscore.
+# (essentially anything that isn't an alphanum, dot, dash, or underscore).
 sre = re.compile(r'[^-\w.]')
 # Regexp to strip out leading dots
 dre = re.compile(r'^\.*')
@@ -298,7 +298,7 @@
 # If the message isn't a multipart, then we'll strip it out as an
 # attachment that would have to be separately downloaded.  Pipermail
 # will transform the url into a hyperlink.
-elif part and not part.is_multipart():
+elif part._payload and not part.is_multipart():
 payload = part.get_payload(decode=True)
 ctype = part.get_type()
 # XXX Under email 2.5, it is possible that payload will be None.
@@ -349,7 +349,8 @@
 text = []
 for part in msg.walk():
 # TK: bug-id 1099138 and multipart
-if not part or part.is_multipart():
+# MAS test payload - if part may fail if there are no headers.
+if not part._payload or part.is_multipart():
 continue
 # All parts should be scrubbed to text/plain by now.
 partctype = part.get_content_type()
@@ -447,8 +448,6 @@
 ext = fnext or guess_extension(ctype, fnext)
 else:
 ext = guess_extension(ctype, fnext)
-# Allow only alphanumerics, dash, underscore, and dot
-ext = sre.sub('', ext)
 if not ext:
 # We don't know what it is, so assume it's just a shapeless
 # application/octet-stream, unless the Content-Type: is
@@ -458,6 +457,8 @@
 ext = '.txt'
 else:
 ext = '.bin'
+# Allow only alphanumerics, dash, underscore, and dot
+ext = sre.sub('', ext)
 path = None
 # We need a lock to calculate the next attachment number
 lockfile = os.path.join(fsdir, 'attachments.lock')



--

https://code.launchpad.net/~mailman-coders/mailman/2.1

You are receiving this branch notification because you are subscribed to it.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+subscription/mailman-checkins.
___
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org



[Mailman-checkins] [Branch ~mailman-coders/mailman/2.1]

2007-11-06 Thread noreply

revno: 1002
committer: Mark Sapiro [EMAIL PROTECTED]
branch nick: 2.1
timestamp: Sun 2007-11-04 14:41:26 -0800
message:
  Added removal of Authentication-Results: header.
modified:
  Mailman/Handlers/CleanseDKIM.py

=== modified file 'Mailman/Handlers/CleanseDKIM.py'
--- a/Mailman/Handlers/CleanseDKIM.py   2007-05-08 03:16:04 +
+++ b/Mailman/Handlers/CleanseDKIM.py   2007-11-04 22:41:26 +
@@ -29,8 +29,8 @@
 
 
 def process(mlist, msg, msgdata):
-if not mm_cfg.REMOVE_DKIM_HEADERS:
-return
-del msg['domainkey-signature']
-del msg['dkim-signature']
+if mm_cfg.REMOVE_DKIM_HEADERS:
+del msg['domainkey-signature']
+del msg['dkim-signature']
+del msg['authentication-results']
 



--

https://code.launchpad.net/~mailman-coders/mailman/2.1

You are receiving this branch notification because you are subscribed to it.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+subscription/mailman-checkins.
___
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org



[Mailman-checkins] [Branch ~mailman-coders/mailman/2.1]

2007-11-06 Thread noreply

revno: 1004
committer: Mark Sapiro [EMAIL PROTECTED]
branch nick: 2.1
timestamp: Sun 2007-11-04 15:19:31 -0800
message:
  Added Date and Message-ID headers to the confirm reply
  message that Mailman adds to the admin notification.
modified:
  Mailman/Handlers/Hold.py

=== modified file 'Mailman/Handlers/Hold.py'
--- a/Mailman/Handlers/Hold.py  2006-07-30 19:35:36 +
+++ b/Mailman/Handlers/Hold.py  2007-11-04 23:19:31 +
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2006 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2007 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
@@ -283,6 +283,8 @@
 dmsg['Subject'] = 'confirm ' + cookie
 dmsg['Sender'] = requestaddr
 dmsg['From'] = requestaddr
+dmsg['Date'] = email.Utils.formatdate(localtime=True)
+dmsg['Message-ID'] = Utils.unique_message_id(mlist)
 nmsg.attach(text)
 nmsg.attach(MIMEMessage(msg))
 nmsg.attach(MIMEMessage(dmsg))



--

https://code.launchpad.net/~mailman-coders/mailman/2.1

You are receiving this branch notification because you are subscribed to it.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+subscription/mailman-checkins.
___
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org