From cd47d41512f99aff9eaaaaf6e796a34aa00fa8bf Mon Sep 17 00:00:00 2001 From: Jim Popovitch Date: Wed, 6 Jun 2018 10:06:19 +0000 Subject: Improved logging of security related events --- Mailman/Cgi/admin.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Mailman/Cgi/admin.py') diff --git a/Mailman/Cgi/admin.py b/Mailman/Cgi/admin.py index eeefc056..2a86298a 100644 --- a/Mailman/Cgi/admin.py +++ b/Mailman/Cgi/admin.py @@ -119,6 +119,11 @@ def main(): if cgidata.has_key('adminpw'): # This is a re-authorization attempt msg = Bold(FontSize('+1', _('Authorization failed.'))).Format() + remote = os.environ.get('HTTP_FORWARDED_FOR', + os.environ.get('HTTP_X_FORWARDED_FOR', + os.environ.get('REMOTE_ADDR', + 'unidentified origin'))) + syslog('security', 'Authorization failed (admin): list=%s: remote=%s', listname, remote) else: msg = '' Auth.loginpage(mlist, 'admin', msg=msg) -- cgit v1.2.3