From 2073882abbbcc1a7d5dbbe7f71d27cfaef35d4ce Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Mon, 29 Nov 1999 16:40:53 +0000 Subject: ChangeOptions(): Don't allow real_name to differ from _internal_name by anything other than letter case. This is a QND (quick 'n' dirty) security patch when using an external archiver. --- Mailman/Cgi/admin.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Mailman/Cgi/admin.py b/Mailman/Cgi/admin.py index 8e6d563ec..df2f57838 100644 --- a/Mailman/Cgi/admin.py +++ b/Mailman/Cgi/admin.py @@ -811,6 +811,17 @@ def ChangeOptions(mlist, category, cgi_info, document): val = cgi_info[property].value value = GetValidValue(mlist, property, kind, val, deps) if getattr(mlist, property) != value: + # TBD: Ensure that mlist.real_name differs only in letter + # case. Otherwise a security hole can potentially be opened + # when using an external archiver. This seems ad-hoc and + # could use a more general security policy. + if property == 'real_name' and \ + string.lower(value) <> string.lower(mlist._internal_name): + # then don't install this value. + document.AddItem("""

real_name attribute not + changed! It must differ from the list's name by case + only.

""") + continue setattr(mlist, property, value) dirty = 1 # -- cgit v1.3.1