aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2017-06-03 13:33:49 -0700
committerMark Sapiro <mark@msapiro.net>2017-06-03 13:33:49 -0700
commitaab0efe4e81950567bc44c3c6148cc9cf6a9f167 (patch)
treece9da9b5107223925c2b814f1863057e5e4bc5fe
parenta6669234ed864cadd85fdaf3f8cc86e442bdc30f (diff)
downloadmailman2-aab0efe4e81950567bc44c3c6148cc9cf6a9f167.tar.gz
mailman2-aab0efe4e81950567bc44c3c6148cc9cf6a9f167.tar.xz
mailman2-aab0efe4e81950567bc44c3c6148cc9cf6a9f167.zip
Fixed the -V option to list_lists to not show subdomains.
Diffstat (limited to '')
-rw-r--r--NEWS7
-rw-r--r--bin/list_lists10
2 files changed, 13 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index b1f35fa3..0d2c4cb4 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,13 @@ Copyright (C) 1998-2016 by the Free Software Foundation, Inc.
Here is a history of user visible changes to Mailman.
+2.1.25 (xx-xxx-xxxx)
+
+ Bug fixes and other patches
+
+ - Fixed the -V option to bin/list_lists to not show lists whose host is a
+ subdomain of the given domain. (LP: #1695610)
+
2.1.24 (02-Jun-2017)
Security
diff --git a/bin/list_lists b/bin/list_lists
index 4a546885..a6824c31 100644
--- a/bin/list_lists
+++ b/bin/list_lists
@@ -1,6 +1,6 @@
#! @PYTHON@
#
-# Copyright (C) 1998-2016 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -42,6 +42,7 @@ Where:
"""
+import re
import sys
import getopt
import paths
@@ -106,9 +107,10 @@ def main():
continue
if public and mlist.archive_private:
continue
- if vhost and mm_cfg.VIRTUAL_HOST_OVERVIEW and \
- vhost.find(mlist.web_page_url) == -1 and \
- mlist.web_page_url.find(vhost) == -1:
+ if (vhost and mm_cfg.VIRTUAL_HOST_OVERVIEW and
+ not re.search('://%s/' % re.escape(vhost),
+ mlist.web_page_url,
+ re.IGNORECASE)):
continue
mlists.append(mlist)
longest = max(len(mlist.real_name), longest)