------------------------------------------------------------
revno: 1578
fixes bug: https://launchpad.net/bugs/1496620
committer: Mark Sapiro <m...@msapiro.net>
branch nick: 2.1
timestamp: Wed 2015-09-16 19:52:18 -0700
message:
  Subject prefixing could fail to collapse multiple 'Re:' in an incomming
  message if they all came after the list's subject_prefix.
modified:
  Mailman/Handlers/CookHeaders.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/CookHeaders.py'
--- Mailman/Handlers/CookHeaders.py	2015-06-08 05:41:05 +0000
+++ Mailman/Handlers/CookHeaders.py	2015-09-17 02:52:18 +0000
@@ -380,7 +380,13 @@
     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:'

=== modified file 'NEWS'
--- NEWS	2015-09-17 00:39:34 +0000
+++ NEWS	2015-09-17 02:52:18 +0000
@@ -20,6 +20,10 @@
 
   Bug fixes and other patches
 
+    - Subject prefixing could fail to collapse multiple 'Re:' in an incomming
+      message if they all came after the list's subject_prefix.  This is now
+      fixed.  (LP: #1496620)
+
     - Defended against a user submitting URLs with query fragments or POST
       data containing multiple occurrences of the same variable.
       (LP: #1496632)

_______________________________________________
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to