From c0a5c55fee93f32176338d116b30d2f06866045d Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Fri, 6 Feb 2015 12:06:55 -0800 Subject: Remove Organization: header from anonymized posts. Handle regexps with trailing ':' in ANONYMOUS_LIST_KEEP_HEADERS. --- Mailman/Handlers/Cleanse.py | 5 ++++- NEWS | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3