diff options
Diffstat (limited to 'Mailman/Cgi/private.py')
-rwxr-xr-x[-rw-r--r--] | Mailman/Cgi/private.py | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/Mailman/Cgi/private.py b/Mailman/Cgi/private.py index b0358285..36cacee4 100644..100755 --- a/Mailman/Cgi/private.py +++ b/Mailman/Cgi/private.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2011 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2014 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 @@ -111,7 +111,7 @@ def main(): # Send this with a 404 status. print 'Status: 404 Not Found' print doc.Format() - syslog('error', 'No such list "%s": %s\n', listname, e) + syslog('error', 'private: No such list "%s": %s\n', listname, e) return i18n.set_language(mlist.preferred_language) @@ -135,6 +135,27 @@ def main(): message = Bold(FontSize('+1', _('Authorization failed.'))).Format() # give an HTTP 401 for authentication failure print 'Status: 401 Unauthorized' + # Are we processing a password reminder from the login screen? + if cgidata.has_key('login-remind'): + if username: + message = Bold(FontSize('+1', _("""If you are a list member, + your password has been emailed to you."""))).Format() + else: + message = Bold(FontSize('+1', + _('Please enter your email address'))).Format() + if mlist.isMember(username): + mlist.MailUserPassword(username) + elif username: + # Not a member + if mlist.private_roster == 0: + # Public rosters + safeuser = Utils.websafe(username) + message = Bold(FontSize('+1', + _('No such member: %(safeuser)s.'))).Format() + else: + syslog('mischief', + 'Reminder attempt of non-member w/ private rosters: %s', + username) # Output the password form charset = Utils.GetCharSet(mlist.preferred_language) print 'Content-type: text/html; charset=' + charset + '\n\n' |