From 1be785a563753165ced2715619c2a795618e733f Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Sat, 15 Mar 2008 22:09:31 -0700 Subject: Gui/GuiBase.py - Don't allow self references in *_these_nonmembers or regular_(in|ex)clude_lists. Handlers/CalcRecips.py - Log and skip any self reference lists in regular_(in|ex)clude_lists. Compare To: and Cc: addresses and regular_(in|ex)clude_lists case insensitively. Handlers/Moderate.py - Log and skip any self reference lists in *_these_nonmembers. --- Mailman/Gui/GUIBase.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'Mailman/Gui') diff --git a/Mailman/Gui/GUIBase.py b/Mailman/Gui/GUIBase.py index b27542ed..19714e1c 100644 --- a/Mailman/Gui/GUIBase.py +++ b/Mailman/Gui/GUIBase.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2007 by the Free Software Foundation, Inc. +# Copyright (C) 2002-2008 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 @@ -78,12 +78,20 @@ class GUIBase: re.compile(addr) except re.error: raise ValueError - elif wtype == mm_cfg.EmailListEx and addr.startswith('@'): + elif (wtype == mm_cfg.EmailListEx and addr.startswith('@') + and property.endswith('_these_nonmembers')): # XXX Needs to be reviewed for list@domain names. - # check for existence of list? - pass + # don't reference your own list + if addr[1:] == mlist.internal_name(): + raise ValueError + # check for existence of list? For now allow + # reference to list before creating it. else: raise + if property in ('regular_exclude_lists', + 'regular_include_lists'): + if addr.lower() == mlist.GetListEmail().lower(): + raise Errors.EmailAddressError addrs.append(addr) return addrs # This is a host name, i.e. verbatim -- cgit v1.2.3