diff options
author | Mark Sapiro <mark@msapiro.net> | 2015-09-16 19:52:18 -0700 |
---|---|---|
committer | Mark Sapiro <mark@msapiro.net> | 2015-09-16 19:52:18 -0700 |
commit | d5a48ae6a27174e6d9ce925d63b749b77db54582 (patch) | |
tree | 8484fb5bd7e55c4d03b324c245c3c530aa7e57c9 /Mailman/Handlers | |
parent | 6f9679030c1c2037a6a12555dbfe02445b012646 (diff) | |
download | mailman2-d5a48ae6a27174e6d9ce925d63b749b77db54582.tar.gz mailman2-d5a48ae6a27174e6d9ce925d63b749b77db54582.tar.xz mailman2-d5a48ae6a27174e6d9ce925d63b749b77db54582.zip |
Subject prefixing could fail to collapse multiple 'Re:' in an incomming
message if they all came after the list's subject_prefix.
Diffstat (limited to 'Mailman/Handlers')
-rwxr-xr-x | Mailman/Handlers/CookHeaders.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Mailman/Handlers/CookHeaders.py b/Mailman/Handlers/CookHeaders.py index 25fda890..63e630cb 100755 --- a/Mailman/Handlers/CookHeaders.py +++ b/Mailman/Handlers/CookHeaders.py @@ -380,7 +380,13 @@ def prefix_subject(mlist, msg, msgdata): else: old_style = mm_cfg.OLD_STYLE_PREFIXING subject = re.sub(prefix_pattern, '', subject) - rematch = re.match('((RE|AW|SV|VS)\s*(\[\d+\])?\s*:\s*)+', subject, re.I) + # Previously the following re didn't have the first \s*. It would fail + # if the incoming Subject: was like '[prefix] Re: Re: Re:' because of the + # leading space after stripping the prefix. It is not known what MUA would + # create such a Subject:, but the issue was reported. + rematch = re.match( + '(\s*(RE|AW|SV|VS)\s*(\[\d+\])?\s*:\s*)+', + subject, re.I) if rematch: subject = subject[rematch.end():] recolon = 'Re:' |