diff options
author | Mark Sapiro <mark@msapiro.net> | 2016-02-28 22:28:44 -0800 |
---|---|---|
committer | Mark Sapiro <mark@msapiro.net> | 2016-02-28 22:28:44 -0800 |
commit | 8f22ba21a32701d2efaac0b8b1a1c0a4522912b0 (patch) | |
tree | f54b733b0a6a3353cb595d6c4664689ea5bf8a3f /Mailman/Handlers/MimeDel.py | |
parent | 40828756927efe3406e51cc60e9f36ee68973bae (diff) | |
download | mailman2-8f22ba21a32701d2efaac0b8b1a1c0a4522912b0.tar.gz mailman2-8f22ba21a32701d2efaac0b8b1a1c0a4522912b0.tar.xz mailman2-8f22ba21a32701d2efaac0b8b1a1c0a4522912b0.zip |
Don't collapse multipart with a single sub-part inside multipart/signed parts.
Diffstat (limited to '')
-rw-r--r-- | Mailman/Handlers/MimeDel.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Mailman/Handlers/MimeDel.py b/Mailman/Handlers/MimeDel.py index ab7483ba..691a6e85 100644 --- a/Mailman/Handlers/MimeDel.py +++ b/Mailman/Handlers/MimeDel.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2011 by the Free Software Foundation, Inc. +# Copyright (C) 2002-2016 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 @@ -210,6 +210,11 @@ def recast_multipart(msg): # If we're left with a multipart message with only one sub-part, recast # the message to just the sub-part, but not if the part is message/rfc822 # because we don't want to lose the headers. + # Also, if this is a multipart/signed part, stop now as the original part + # may have had a multipart sub-part with only one sub-sub-part, the sig + # may still be valid and going further may break it. (LP: #1551075) + if msg.get_content_type() == 'multipart/signed': + return if msg.is_multipart(): if (len(msg.get_payload()) == 1 and msg.get_content_type() <> 'message/rfc822'): |