------------------------------------------------------------
revno: 1187
committer: Mark Sapiro <[email protected]>
branch nick: 2.1
timestamp: Sat 2009-08-01 12:14:32 -0700
message:
Removed or anonymized additional headers in posts to anonymous lists.
modified:
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/Cleanse.py'
--- Mailman/Handlers/Cleanse.py 2006-01-15 21:01:35 +0000
+++ Mailman/Handlers/Cleanse.py 2009-08-01 19:14:32 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2006 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
@@ -17,8 +17,11 @@
"""Cleanse certain headers from all messages."""
+import re
+
from email.Utils import formataddr
+from Mailman.Utils import unique_message_id
from Mailman.Logging.Syslog import syslog
from Mailman.Handlers.CookHeaders import uheader
@@ -39,11 +42,21 @@
del msg['from']
del msg['reply-to']
del msg['sender']
+ del msg['return-path']
# Hotmail sets this one
del msg['x-originating-email']
+ # And these can reveal the sender too
+ del msg['received']
+ # And so can the message-id so replace it.
+ del msg['message-id']
+ msg['Message-ID'] = unique_message_id(mlist)
i18ndesc = str(uheader(mlist, mlist.description, 'From'))
msg['From'] = formataddr((i18ndesc, mlist.GetListEmail()))
msg['Reply-To'] = mlist.GetListEmail()
+ uf = msg.get_unixfrom()
+ if uf:
+ uf = re.sub(r'\...@\s*', mlist.GetListEmail(), uf)
+ msg.set_unixfrom(uf)
# Some headers can be used to fish for membership
del msg['return-receipt-to']
del msg['disposition-notification-to']
=== modified file 'NEWS'
--- NEWS 2009-08-01 19:01:28 +0000
+++ NEWS 2009-08-01 19:14:32 +0000
@@ -8,6 +8,8 @@
Bug Fixes and other patches
+ - Removed or anonymized additional headers in posts to anonymous lists.
+
- Fixed a bug that could cause incorrect threading of replies to archived
messages that arrive with timestamps in the same second.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org