------------------------------------------------------------
revno: 1746
fixes bug: https://launchpad.net/bugs/1754516
committer: Mark Sapiro <m...@msapiro.net>
branch nick: 2.1
timestamp: Thu 2018-03-08 16:00:54 -0800
message:
  Bad values in topics no longer break the list.
modified:
  Mailman/MailList.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/MailList.py'
--- Mailman/MailList.py	2016-11-16 23:27:10 +0000
+++ Mailman/MailList.py	2018-03-09 00:00:54 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2016 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2018 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
@@ -784,8 +784,16 @@
             self.reply_to_address = ''
             self.reply_goes_to_list = 0
         # Legacy topics may have bad regular expressions in their patterns
+        # Also, someone may have broken topics with, e.g., config_list.
         goodtopics = []
-        for name, pattern, desc, emptyflag in self.topics:
+        for value in self.topics:
+            try:
+                name, pattern, desc, emptyflag = value
+            except ValueError:
+                # This value is not a 4-tuple. Just log and drop it.
+                syslog('error', 'Bad topic "%s" for list: %s',
+                       value, self.internal_name())
+                continue
             try:
                 orpattern = OR.join(pattern.splitlines())
                 re.compile(orpattern)

=== modified file 'NEWS'
--- NEWS	2018-03-01 17:26:02 +0000
+++ NEWS	2018-03-09 00:00:54 +0000
@@ -9,6 +9,9 @@
 
   Bug fixes and other patches
 
+    - Bad values in a list's topics will no longer break everything that
+      might instantiate the list.  (LP: #1754516)
+
     - A Python 2.7 dependency introduced with the reCAPTCHA feature in 2.1.26
       has been removed.  (LP: #1752658)
 

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

Reply via email to