aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2018-03-08 16:00:54 -0800
committerMark Sapiro <mark@msapiro.net>2018-03-08 16:00:54 -0800
commite61719889de7b570adb19af5e223c66f1e09e8bc (patch)
treee68135144f2e9c710c218ee432122a528ec5fcd5 /Mailman
parentf10605db754277a509f99ae35538cd066d0143e2 (diff)
downloadmailman2-e61719889de7b570adb19af5e223c66f1e09e8bc.tar.gz
mailman2-e61719889de7b570adb19af5e223c66f1e09e8bc.tar.xz
mailman2-e61719889de7b570adb19af5e223c66f1e09e8bc.zip
Bad values in topics no longer break the list.
Diffstat (limited to 'Mailman')
-rwxr-xr-xMailman/MailList.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py
index d1dc17a4..619c3206 100755
--- a/Mailman/MailList.py
+++ b/Mailman/MailList.py
@@ -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 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin,
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)