From d666f545ea57d63e7fb68d3e5058182894a77f0c Mon Sep 17 00:00:00 2001 From: bwarsaw <> Date: Sun, 28 Sep 2003 16:03:34 +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. Backported from HEAD. --- Mailman/MailList.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Mailman/MailList.py b/Mailman/MailList.py index 9979d221..ad3aa7e8 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.2.3