From a03b83e433bb1275d16cae8e18801d7ee8bdf2ac Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Sun, 28 Sep 2003 15:59:32 +0000 Subject: MailList.__init__(): When trying to execfile extend.py, we ignore ENOENT but log all other IOErrors instead of propagating them up. Closes a tiny exploit found by Ned Dawes. Backport candidate. --- Mailman/MailList.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Mailman/MailList.py b/Mailman/MailList.py index 9979d221e..ad3aa7e8a 100644 --- a/Mailman/MailList.py +++ b/Mailman/MailList.py @@ -112,7 +112,11 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin, try: execfile(filename, dict) except IOError, e: - if e.errno <> errno.ENOENT: raise + # Ignore missing files, but log other errors + if e.errno == errno.ENOENT: + pass + else: + syslog('error', 'IOError reading list extension: %s', e) else: func = dict.get('extend') if func: -- cgit v1.3.1