diff options
author | Mark Sapiro <mark@msapiro.net> | 2010-02-04 17:23:54 -0800 |
---|---|---|
committer | Mark Sapiro <mark@msapiro.net> | 2010-02-04 17:23:54 -0800 |
commit | 444845fdff42baec439120654e869d56cc891613 (patch) | |
tree | 16c763ce5fa0a29948c1c68896e58cfbff2476d4 /Mailman/Cgi/Auth.py | |
parent | 342ced1457cd51d6181a506648f62a800ff18bc7 (diff) | |
download | mailman2-444845fdff42baec439120654e869d56cc891613.tar.gz mailman2-444845fdff42baec439120654e869d56cc891613.tar.xz mailman2-444845fdff42baec439120654e869d56cc891613.zip |
We now give an HTTP 401 status for authentication failures from admin,
admindb, private and options logins.
Diffstat (limited to '')
-rw-r--r-- | Mailman/Cgi/Auth.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Mailman/Cgi/Auth.py b/Mailman/Cgi/Auth.py index 8c66c4d3..986a9235 100644 --- a/Mailman/Cgi/Auth.py +++ b/Mailman/Cgi/Auth.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2010 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 @@ -42,6 +42,8 @@ def loginpage(mlist, scriptname, msg='', frontpage=None): actionurl = Utils.GetRequestURI(url) if msg: msg = FontAttr(msg, color='#ff0000', size='+1').Format() + # give an HTTP 401 for authentication failure + print 'Status: 401 Unauthorized' if scriptname == 'admindb': who = _('Moderator') else: |