aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Utils.py
diff options
context:
space:
mode:
authorJim Popovitch <jimpop@domainmail.org>2018-06-06 10:06:19 +0000
committerJim Popovitch <jimpop@domainmail.org>2018-06-06 10:06:19 +0000
commitcd47d41512f99aff9eaaaaf6e796a34aa00fa8bf (patch)
tree11a9319cdd23a725293e77d7f7bbfe1712fe53e5 /Mailman/Utils.py
parent8291c814c54d87c7958304e471a5c5c013417e45 (diff)
downloadmailman2-cd47d41512f99aff9eaaaaf6e796a34aa00fa8bf.tar.gz
mailman2-cd47d41512f99aff9eaaaaf6e796a34aa00fa8bf.tar.xz
mailman2-cd47d41512f99aff9eaaaaf6e796a34aa00fa8bf.zip
Improved logging of security related events
Diffstat (limited to 'Mailman/Utils.py')
-rw-r--r--Mailman/Utils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py
index 6038667b..b38776f8 100644
--- a/Mailman/Utils.py
+++ b/Mailman/Utils.py
@@ -111,7 +111,11 @@ def list_exists(listname):
# But first ensure the list name doesn't contain a path traversal
# attack.
if len(re.sub(mm_cfg.ACCEPTABLE_LISTNAME_CHARACTERS, '', listname)) > 0:
- syslog('mischief', 'Hostile listname: %s', listname)
+ remote = os.environ.get('HTTP_FORWARDED_FOR',
+ os.environ.get('HTTP_X_FORWARDED_FOR',
+ os.environ.get('REMOTE_ADDR',
+ 'unidentified origin')))
+ syslog('mischief', 'Hostile listname: listname=%s remote=%s', listname, remote)
return False
basepath = Site.get_listpath(listname)
for ext in ('.pck', '.pck.last', '.db', '.db.last'):