aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2015-02-06 12:06:55 -0800
committerMark Sapiro <mark@msapiro.net>2015-02-06 12:06:55 -0800
commitc0a5c55fee93f32176338d116b30d2f06866045d (patch)
treef006abfe941ac650c536aaa8002d5b417cf3a699
parent43c25066a4560a6b956dc4c97fbda78bd2caf90f (diff)
downloadmailman2-c0a5c55fee93f32176338d116b30d2f06866045d.tar.gz
mailman2-c0a5c55fee93f32176338d116b30d2f06866045d.tar.xz
mailman2-c0a5c55fee93f32176338d116b30d2f06866045d.zip
Remove Organization: header from anonymized posts.
Handle regexps with trailing ':' in ANONYMOUS_LIST_KEEP_HEADERS.
Diffstat (limited to '')
-rw-r--r--Mailman/Handlers/Cleanse.py5
-rwxr-xr-xNEWS5
2 files changed, 9 insertions, 1 deletions
diff --git a/Mailman/Handlers/Cleanse.py b/Mailman/Handlers/Cleanse.py
index c3e7aa43..c684cd19 100644
--- a/Mailman/Handlers/Cleanse.py
+++ b/Mailman/Handlers/Cleanse.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2013 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2015 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
@@ -29,6 +29,8 @@ from Mailman.Handlers.CookHeaders import uheader
cres = []
for regexp in mm_cfg.ANONYMOUS_LIST_KEEP_HEADERS:
try:
+ if regexp.endswith(':'):
+ regexp = regexp[:-1] + '$'
cres.append(re.compile(regexp, re.IGNORECASE))
except re.error, e:
syslog('error',
@@ -65,6 +67,7 @@ def process(mlist, msg, msgdata):
del msg['from']
del msg['reply-to']
del msg['sender']
+ del msg['organization']
del msg['return-path']
# Hotmail sets this one
del msg['x-originating-email']
diff --git a/NEWS b/NEWS
index dc09501e..9b41df0a 100755
--- a/NEWS
+++ b/NEWS
@@ -138,6 +138,11 @@ Here is a history of user visible changes to Mailman.
Bug fixes and other patches
+ - Organization: headers are now unconditionally removed from posts to
+ anonymous lists. Regexps in ANONYMOUS_LIST_KEEP_HEADERS weren't kept
+ if the regexp included the trailing ':'. This is fixed too.
+ (LP: #1419132)
+
- The admindb interface has been fixed so the the detail message body
display doesn't lose part of a multi-byte character, and characters which
are invalid in the message's charset are replaced rather than the whole