summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/attic/Bouncer.py (renamed from src/mailman/attic/Bouncer.py)0
-rw-r--r--src/attic/Defaults.py (renamed from src/mailman/attic/Defaults.py)0
-rw-r--r--src/attic/Deliverer.py (renamed from src/mailman/attic/Deliverer.py)0
-rw-r--r--src/attic/Digester.py (renamed from src/mailman/attic/Digester.py)0
-rw-r--r--src/attic/MailList.py (renamed from src/mailman/attic/MailList.py)0
-rw-r--r--src/attic/Mailbox.py (renamed from src/mailman/attic/Mailbox.py)0
-rw-r--r--src/attic/SecurityManager.py (renamed from src/mailman/attic/SecurityManager.py)0
-rwxr-xr-xsrc/attic/bin/clone_member (renamed from src/mailman/attic/bin/clone_member)0
-rw-r--r--src/attic/bin/discard (renamed from src/mailman/attic/bin/discard)0
-rw-r--r--src/attic/bin/fix_url.py (renamed from src/mailman/attic/bin/fix_url.py)0
-rw-r--r--src/attic/bin/list_admins (renamed from src/mailman/attic/bin/list_admins)0
-rw-r--r--src/attic/bin/msgfmt.py (renamed from src/mailman/attic/bin/msgfmt.py)0
-rw-r--r--src/attic/bin/po2templ.py (renamed from src/mailman/attic/bin/po2templ.py)0
-rw-r--r--src/attic/bin/pygettext.py (renamed from src/mailman/attic/bin/pygettext.py)0
-rwxr-xr-xsrc/attic/bin/remove_members (renamed from src/mailman/attic/bin/remove_members)0
-rw-r--r--src/attic/bin/reset_pw.py (renamed from src/mailman/attic/bin/reset_pw.py)0
-rwxr-xr-xsrc/attic/bin/sync_members (renamed from src/mailman/attic/bin/sync_members)0
-rw-r--r--src/attic/bin/templ2pot.py (renamed from src/mailman/attic/bin/templ2pot.py)0
-rwxr-xr-xsrc/attic/bin/transcheck (renamed from src/mailman/attic/bin/transcheck)0
-rw-r--r--src/attic/digests.py (renamed from src/mailman/attic/digests.py)0
-rw-r--r--src/mailman/Utils.py73
-rw-r--r--src/mailman/mta/smtp_direct.py2
-rw-r--r--src/mailman/pipeline/moderate.py22
-rw-r--r--src/web/Cgi/Auth.py (renamed from src/mailman/web/Cgi/Auth.py)0
-rw-r--r--src/web/Cgi/__init__.py (renamed from src/mailman/web/Cgi/__init__.py)0
-rw-r--r--src/web/Cgi/admin.py (renamed from src/mailman/web/Cgi/admin.py)0
-rw-r--r--src/web/Cgi/admindb.py (renamed from src/mailman/web/Cgi/admindb.py)0
-rw-r--r--src/web/Cgi/confirm.py (renamed from src/mailman/web/Cgi/confirm.py)0
-rw-r--r--src/web/Cgi/create.py (renamed from src/mailman/web/Cgi/create.py)0
-rw-r--r--src/web/Cgi/edithtml.py (renamed from src/mailman/web/Cgi/edithtml.py)0
-rw-r--r--src/web/Cgi/listinfo.py (renamed from src/mailman/web/Cgi/listinfo.py)0
-rw-r--r--src/web/Cgi/options.py (renamed from src/mailman/web/Cgi/options.py)0
-rw-r--r--src/web/Cgi/private.py (renamed from src/mailman/web/Cgi/private.py)0
-rw-r--r--src/web/Cgi/rmlist.py (renamed from src/mailman/web/Cgi/rmlist.py)0
-rw-r--r--src/web/Cgi/roster.py (renamed from src/mailman/web/Cgi/roster.py)0
-rw-r--r--src/web/Cgi/subscribe.py (renamed from src/mailman/web/Cgi/subscribe.py)0
-rw-r--r--src/web/Cgi/wsgi_app.py (renamed from src/mailman/web/Cgi/wsgi_app.py)0
-rw-r--r--src/web/Gui/Archive.py (renamed from src/mailman/web/Gui/Archive.py)0
-rw-r--r--src/web/Gui/Autoresponse.py (renamed from src/mailman/web/Gui/Autoresponse.py)0
-rw-r--r--src/web/Gui/Bounce.py (renamed from src/mailman/web/Gui/Bounce.py)0
-rw-r--r--src/web/Gui/ContentFilter.py (renamed from src/mailman/web/Gui/ContentFilter.py)0
-rw-r--r--src/web/Gui/Digest.py (renamed from src/mailman/web/Gui/Digest.py)0
-rw-r--r--src/web/Gui/GUIBase.py (renamed from src/mailman/web/Gui/GUIBase.py)0
-rw-r--r--src/web/Gui/General.py (renamed from src/mailman/web/Gui/General.py)0
-rw-r--r--src/web/Gui/Language.py (renamed from src/mailman/web/Gui/Language.py)0
-rw-r--r--src/web/Gui/Membership.py (renamed from src/mailman/web/Gui/Membership.py)0
-rw-r--r--src/web/Gui/NonDigest.py (renamed from src/mailman/web/Gui/NonDigest.py)0
-rw-r--r--src/web/Gui/Passwords.py (renamed from src/mailman/web/Gui/Passwords.py)0
-rw-r--r--src/web/Gui/Privacy.py (renamed from src/mailman/web/Gui/Privacy.py)0
-rw-r--r--src/web/Gui/Topics.py (renamed from src/mailman/web/Gui/Topics.py)0
-rw-r--r--src/web/Gui/Usenet.py (renamed from src/mailman/web/Gui/Usenet.py)0
-rw-r--r--src/web/Gui/__init__.py (renamed from src/mailman/web/Gui/__init__.py)0
-rw-r--r--src/web/HTMLFormatter.py (renamed from src/mailman/web/HTMLFormatter.py)0
-rw-r--r--src/web/__init__.py (renamed from src/mailman/web/__init__.py)0
-rw-r--r--src/web/htmlformat.py (renamed from src/mailman/web/htmlformat.py)0
55 files changed, 12 insertions, 85 deletions
diff --git a/src/mailman/attic/Bouncer.py b/src/attic/Bouncer.py
index e2de3c915..e2de3c915 100644
--- a/src/mailman/attic/Bouncer.py
+++ b/src/attic/Bouncer.py
diff --git a/src/mailman/attic/Defaults.py b/src/attic/Defaults.py
index 6f72ed535..6f72ed535 100644
--- a/src/mailman/attic/Defaults.py
+++ b/src/attic/Defaults.py
diff --git a/src/mailman/attic/Deliverer.py b/src/attic/Deliverer.py
index 0ba3a01bb..0ba3a01bb 100644
--- a/src/mailman/attic/Deliverer.py
+++ b/src/attic/Deliverer.py
diff --git a/src/mailman/attic/Digester.py b/src/attic/Digester.py
index a88d08abc..a88d08abc 100644
--- a/src/mailman/attic/Digester.py
+++ b/src/attic/Digester.py
diff --git a/src/mailman/attic/MailList.py b/src/attic/MailList.py
index 2d538f026..2d538f026 100644
--- a/src/mailman/attic/MailList.py
+++ b/src/attic/MailList.py
diff --git a/src/mailman/attic/Mailbox.py b/src/attic/Mailbox.py
index 3a2f079c4..3a2f079c4 100644
--- a/src/mailman/attic/Mailbox.py
+++ b/src/attic/Mailbox.py
diff --git a/src/mailman/attic/SecurityManager.py b/src/attic/SecurityManager.py
index 8d4a30592..8d4a30592 100644
--- a/src/mailman/attic/SecurityManager.py
+++ b/src/attic/SecurityManager.py
diff --git a/src/mailman/attic/bin/clone_member b/src/attic/bin/clone_member
index 1f2a03aca..1f2a03aca 100755
--- a/src/mailman/attic/bin/clone_member
+++ b/src/attic/bin/clone_member
diff --git a/src/mailman/attic/bin/discard b/src/attic/bin/discard
index c30198441..c30198441 100644
--- a/src/mailman/attic/bin/discard
+++ b/src/attic/bin/discard
diff --git a/src/mailman/attic/bin/fix_url.py b/src/attic/bin/fix_url.py
index 30618a1a3..30618a1a3 100644
--- a/src/mailman/attic/bin/fix_url.py
+++ b/src/attic/bin/fix_url.py
diff --git a/src/mailman/attic/bin/list_admins b/src/attic/bin/list_admins
index c628a42dc..c628a42dc 100644
--- a/src/mailman/attic/bin/list_admins
+++ b/src/attic/bin/list_admins
diff --git a/src/mailman/attic/bin/msgfmt.py b/src/attic/bin/msgfmt.py
index 8a2d4e66e..8a2d4e66e 100644
--- a/src/mailman/attic/bin/msgfmt.py
+++ b/src/attic/bin/msgfmt.py
diff --git a/src/mailman/attic/bin/po2templ.py b/src/attic/bin/po2templ.py
index 86eae96b9..86eae96b9 100644
--- a/src/mailman/attic/bin/po2templ.py
+++ b/src/attic/bin/po2templ.py
diff --git a/src/mailman/attic/bin/pygettext.py b/src/attic/bin/pygettext.py
index 84421ee8c..84421ee8c 100644
--- a/src/mailman/attic/bin/pygettext.py
+++ b/src/attic/bin/pygettext.py
diff --git a/src/mailman/attic/bin/remove_members b/src/attic/bin/remove_members
index a7b4ebb47..a7b4ebb47 100755
--- a/src/mailman/attic/bin/remove_members
+++ b/src/attic/bin/remove_members
diff --git a/src/mailman/attic/bin/reset_pw.py b/src/attic/bin/reset_pw.py
index 453c8b849..453c8b849 100644
--- a/src/mailman/attic/bin/reset_pw.py
+++ b/src/attic/bin/reset_pw.py
diff --git a/src/mailman/attic/bin/sync_members b/src/attic/bin/sync_members
index 4a21624c1..4a21624c1 100755
--- a/src/mailman/attic/bin/sync_members
+++ b/src/attic/bin/sync_members
diff --git a/src/mailman/attic/bin/templ2pot.py b/src/attic/bin/templ2pot.py
index 0253cc2cd..0253cc2cd 100644
--- a/src/mailman/attic/bin/templ2pot.py
+++ b/src/attic/bin/templ2pot.py
diff --git a/src/mailman/attic/bin/transcheck b/src/attic/bin/transcheck
index 73910e771..73910e771 100755
--- a/src/mailman/attic/bin/transcheck
+++ b/src/attic/bin/transcheck
diff --git a/src/mailman/attic/digests.py b/src/attic/digests.py
index 812ae1649..812ae1649 100644
--- a/src/mailman/attic/digests.py
+++ b/src/attic/digests.py
diff --git a/src/mailman/Utils.py b/src/mailman/Utils.py
index b6715616c..509537b1e 100644
--- a/src/mailman/Utils.py
+++ b/src/mailman/Utils.py
@@ -194,27 +194,6 @@ def ValidateEmail(s):
-# Patterns which may be used to form malicious path to inject a new
-# line in the mailman error log. (TK: advisory by Moritz Naumann)
-CRNLpat = re.compile(r'[^\x21-\x7e]')
-
-def GetPathPieces(envar='PATH_INFO'):
- path = os.environ.get(envar)
- if path:
- if CRNLpat.search(path):
- path = CRNLpat.split(path)[0]
- log.error('Warning: Possible malformed path attack.')
- return [p for p in path.split('/') if p]
- return []
-
-
-
-def ScriptURL(target):
- up = '../' * len(GetPathPieces())
- return '%s%s' % (up, target + config.CGIEXT)
-
-
-
def GetPossibleMatchingAddrs(name):
"""returns a sorted list of addresses that could possibly match
a given name.
@@ -235,19 +214,6 @@ def GetPossibleMatchingAddrs(name):
-def List2Dict(L, foldcase=False):
- """Return a dict keyed by the entries in the list passed to it."""
- d = {}
- if foldcase:
- for i in L:
- d[i.lower()] = True
- else:
- for i in L:
- d[i] = True
- return d
-
-
-
_vowels = ('a', 'e', 'i', 'o', 'u')
_consonants = ('b', 'c', 'd', 'f', 'g', 'h', 'k', 'm', 'n',
'p', 'r', 's', 't', 'v', 'w', 'x', 'z')
@@ -519,31 +485,6 @@ def maketext(templatefile, dict=None, raw=False, lang=None, mlist=None):
-def GetRequestURI(fallback=None, escape=True):
- """Return the full virtual path this CGI script was invoked with.
-
- Newer web servers seems to supply this info in the REQUEST_URI
- environment variable -- which isn't part of the CGI/1.1 spec.
- Thus, if REQUEST_URI isn't available, we concatenate SCRIPT_NAME
- and PATH_INFO, both of which are part of CGI/1.1.
-
- Optional argument `fallback' (default `None') is returned if both of
- the above methods fail.
-
- The url will be cgi escaped to prevent cross-site scripting attacks,
- unless `escape' is set to 0.
- """
- url = fallback
- if 'REQUEST_URI' in os.environ:
- url = os.environ['REQUEST_URI']
- elif 'SCRIPT_NAME' in os.environ and 'PATH_INFO' in os.environ:
- url = os.environ['SCRIPT_NAME'] + os.environ['PATH_INFO']
- if escape:
- return websafe(url)
- return url
-
-
-
# XXX Replace this with direct calls. For now, existing uses of GetCharSet()
# are too numerous to change.
def GetCharSet(lang):
@@ -551,20 +492,6 @@ def GetCharSet(lang):
-def get_request_domain():
- host = os.environ.get('HTTP_HOST', os.environ.get('SERVER_NAME'))
- port = os.environ.get('SERVER_PORT')
- # Strip off the port if there is one
- if port and host.endswith(':' + port):
- host = host[:-len(port)-1]
- return host.lower()
-
-
-def get_site_noreply():
- return '%s@%s' % (config.NO_REPLY_ADDRESS, config.DEFAULT_EMAIL_HOST)
-
-
-
# Figure out epoch seconds of midnight at the start of today (or the given
# 3-tuple date of (year, month, day).
def midnight(date=None):
diff --git a/src/mailman/mta/smtp_direct.py b/src/mailman/mta/smtp_direct.py
index 327820e72..64694cfc5 100644
--- a/src/mailman/mta/smtp_direct.py
+++ b/src/mailman/mta/smtp_direct.py
@@ -114,7 +114,7 @@ def process(mlist, msg, msgdata):
if mlist:
envsender = mlist.bounces_address
else:
- envsender = Utils.get_site_noreply()
+ envsender = config.mailman.site_owner
# Time to split up the recipient list. If we're personalizing or VERPing
# then each chunk will have exactly one recipient. We'll then hand craft
# an envelope sender and stitch a message together in memory for each one
diff --git a/src/mailman/pipeline/moderate.py b/src/mailman/pipeline/moderate.py
index b5bf38dc9..8d6fc7d65 100644
--- a/src/mailman/pipeline/moderate.py
+++ b/src/mailman/pipeline/moderate.py
@@ -122,21 +122,21 @@ def process(mlist, msg, msgdata):
def matches_p(sender, nonmembers):
- # First strip out all the regular expressions
- plainaddrs = [addr for addr in nonmembers if not addr.startswith('^')]
- addrdict = Utils.List2Dict(plainaddrs, foldcase=1)
- if addrdict.has_key(sender):
- return 1
- # Now do the regular expression matches
- for are in nonmembers:
- if are.startswith('^'):
+ # First strip out all the regular expressions.
+ addresses = set(address.lower() for address in nonmembers
+ if not address.startswith('^'))
+ if sender in addresses:
+ return True
+ # Now do the regular expression matches.
+ for regexp in nonmembers:
+ if regexp.startswith('^'):
try:
- cre = re.compile(are, re.IGNORECASE)
+ cre = re.compile(regexp, re.IGNORECASE)
except re.error:
continue
if cre.search(sender):
- return 1
- return 0
+ return True
+ return False
diff --git a/src/mailman/web/Cgi/Auth.py b/src/web/Cgi/Auth.py
index 825d972f4..825d972f4 100644
--- a/src/mailman/web/Cgi/Auth.py
+++ b/src/web/Cgi/Auth.py
diff --git a/src/mailman/web/Cgi/__init__.py b/src/web/Cgi/__init__.py
index e69de29bb..e69de29bb 100644
--- a/src/mailman/web/Cgi/__init__.py
+++ b/src/web/Cgi/__init__.py
diff --git a/src/mailman/web/Cgi/admin.py b/src/web/Cgi/admin.py
index e5c6ee14b..e5c6ee14b 100644
--- a/src/mailman/web/Cgi/admin.py
+++ b/src/web/Cgi/admin.py
diff --git a/src/mailman/web/Cgi/admindb.py b/src/web/Cgi/admindb.py
index 5d756fc78..5d756fc78 100644
--- a/src/mailman/web/Cgi/admindb.py
+++ b/src/web/Cgi/admindb.py
diff --git a/src/mailman/web/Cgi/confirm.py b/src/web/Cgi/confirm.py
index 188e43068..188e43068 100644
--- a/src/mailman/web/Cgi/confirm.py
+++ b/src/web/Cgi/confirm.py
diff --git a/src/mailman/web/Cgi/create.py b/src/web/Cgi/create.py
index 4bb650957..4bb650957 100644
--- a/src/mailman/web/Cgi/create.py
+++ b/src/web/Cgi/create.py
diff --git a/src/mailman/web/Cgi/edithtml.py b/src/web/Cgi/edithtml.py
index dfc871ec1..dfc871ec1 100644
--- a/src/mailman/web/Cgi/edithtml.py
+++ b/src/web/Cgi/edithtml.py
diff --git a/src/mailman/web/Cgi/listinfo.py b/src/web/Cgi/listinfo.py
index 149be715f..149be715f 100644
--- a/src/mailman/web/Cgi/listinfo.py
+++ b/src/web/Cgi/listinfo.py
diff --git a/src/mailman/web/Cgi/options.py b/src/web/Cgi/options.py
index c529a3ea4..c529a3ea4 100644
--- a/src/mailman/web/Cgi/options.py
+++ b/src/web/Cgi/options.py
diff --git a/src/mailman/web/Cgi/private.py b/src/web/Cgi/private.py
index 87cad7966..87cad7966 100644
--- a/src/mailman/web/Cgi/private.py
+++ b/src/web/Cgi/private.py
diff --git a/src/mailman/web/Cgi/rmlist.py b/src/web/Cgi/rmlist.py
index 4b62f09fb..4b62f09fb 100644
--- a/src/mailman/web/Cgi/rmlist.py
+++ b/src/web/Cgi/rmlist.py
diff --git a/src/mailman/web/Cgi/roster.py b/src/web/Cgi/roster.py
index 2351d6915..2351d6915 100644
--- a/src/mailman/web/Cgi/roster.py
+++ b/src/web/Cgi/roster.py
diff --git a/src/mailman/web/Cgi/subscribe.py b/src/web/Cgi/subscribe.py
index 0eefd0111..0eefd0111 100644
--- a/src/mailman/web/Cgi/subscribe.py
+++ b/src/web/Cgi/subscribe.py
diff --git a/src/mailman/web/Cgi/wsgi_app.py b/src/web/Cgi/wsgi_app.py
index b22dbf452..b22dbf452 100644
--- a/src/mailman/web/Cgi/wsgi_app.py
+++ b/src/web/Cgi/wsgi_app.py
diff --git a/src/mailman/web/Gui/Archive.py b/src/web/Gui/Archive.py
index 4090e74e9..4090e74e9 100644
--- a/src/mailman/web/Gui/Archive.py
+++ b/src/web/Gui/Archive.py
diff --git a/src/mailman/web/Gui/Autoresponse.py b/src/web/Gui/Autoresponse.py
index 72ef42cad..72ef42cad 100644
--- a/src/mailman/web/Gui/Autoresponse.py
+++ b/src/web/Gui/Autoresponse.py
diff --git a/src/mailman/web/Gui/Bounce.py b/src/web/Gui/Bounce.py
index a2f6f887a..a2f6f887a 100644
--- a/src/mailman/web/Gui/Bounce.py
+++ b/src/web/Gui/Bounce.py
diff --git a/src/mailman/web/Gui/ContentFilter.py b/src/web/Gui/ContentFilter.py
index 09817f4aa..09817f4aa 100644
--- a/src/mailman/web/Gui/ContentFilter.py
+++ b/src/web/Gui/ContentFilter.py
diff --git a/src/mailman/web/Gui/Digest.py b/src/web/Gui/Digest.py
index 821d0684f..821d0684f 100644
--- a/src/mailman/web/Gui/Digest.py
+++ b/src/web/Gui/Digest.py
diff --git a/src/mailman/web/Gui/GUIBase.py b/src/web/Gui/GUIBase.py
index b2846eb7b..b2846eb7b 100644
--- a/src/mailman/web/Gui/GUIBase.py
+++ b/src/web/Gui/GUIBase.py
diff --git a/src/mailman/web/Gui/General.py b/src/web/Gui/General.py
index 27ef354be..27ef354be 100644
--- a/src/mailman/web/Gui/General.py
+++ b/src/web/Gui/General.py
diff --git a/src/mailman/web/Gui/Language.py b/src/web/Gui/Language.py
index 05824be5e..05824be5e 100644
--- a/src/mailman/web/Gui/Language.py
+++ b/src/web/Gui/Language.py
diff --git a/src/mailman/web/Gui/Membership.py b/src/web/Gui/Membership.py
index bbfdb438b..bbfdb438b 100644
--- a/src/mailman/web/Gui/Membership.py
+++ b/src/web/Gui/Membership.py
diff --git a/src/mailman/web/Gui/NonDigest.py b/src/web/Gui/NonDigest.py
index 92fb768ad..92fb768ad 100644
--- a/src/mailman/web/Gui/NonDigest.py
+++ b/src/web/Gui/NonDigest.py
diff --git a/src/mailman/web/Gui/Passwords.py b/src/web/Gui/Passwords.py
index b2fea0fb5..b2fea0fb5 100644
--- a/src/mailman/web/Gui/Passwords.py
+++ b/src/web/Gui/Passwords.py
diff --git a/src/mailman/web/Gui/Privacy.py b/src/web/Gui/Privacy.py
index 8d60f9203..8d60f9203 100644
--- a/src/mailman/web/Gui/Privacy.py
+++ b/src/web/Gui/Privacy.py
diff --git a/src/mailman/web/Gui/Topics.py b/src/web/Gui/Topics.py
index 00df988be..00df988be 100644
--- a/src/mailman/web/Gui/Topics.py
+++ b/src/web/Gui/Topics.py
diff --git a/src/mailman/web/Gui/Usenet.py b/src/web/Gui/Usenet.py
index 9c1b50809..9c1b50809 100644
--- a/src/mailman/web/Gui/Usenet.py
+++ b/src/web/Gui/Usenet.py
diff --git a/src/mailman/web/Gui/__init__.py b/src/web/Gui/__init__.py
index 2e12526c0..2e12526c0 100644
--- a/src/mailman/web/Gui/__init__.py
+++ b/src/web/Gui/__init__.py
diff --git a/src/mailman/web/HTMLFormatter.py b/src/web/HTMLFormatter.py
index 594f4adea..594f4adea 100644
--- a/src/mailman/web/HTMLFormatter.py
+++ b/src/web/HTMLFormatter.py
diff --git a/src/mailman/web/__init__.py b/src/web/__init__.py
index e69de29bb..e69de29bb 100644
--- a/src/mailman/web/__init__.py
+++ b/src/web/__init__.py
diff --git a/src/mailman/web/htmlformat.py b/src/web/htmlformat.py
index 608d0e647..608d0e647 100644
--- a/src/mailman/web/htmlformat.py
+++ b/src/web/htmlformat.py