------------------------------------------------------------
revno: 1219
committer: Mark Sapiro <[email protected]>
branch nick: 2.1
timestamp: Thu 2010-02-04 17:23:54 -0800
message:
  We now give an HTTP 401 status for authentication failures from admin,
  admindb, private and options logins.
modified:
  Mailman/Cgi/Auth.py
  Mailman/Cgi/options.py
  Mailman/Cgi/private.py
  NEWS


--
lp:mailman/2.1
https://code.launchpad.net/~mailman-coders/mailman/2.1

Your team Mailman Checkins is subscribed to branch lp:mailman/2.1.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+edit-subscription.
=== modified file 'Mailman/Cgi/Auth.py'
--- Mailman/Cgi/Auth.py	2005-08-27 01:40:17 +0000
+++ Mailman/Cgi/Auth.py	2010-02-05 01:23:54 +0000
@@ -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 @@
         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:

=== modified file 'Mailman/Cgi/options.py'
--- Mailman/Cgi/options.py	2008-04-14 17:45:27 +0000
+++ Mailman/Cgi/options.py	2010-02-05 01:23:54 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2008 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
@@ -252,6 +252,8 @@
                        'Login failure with private rosters: %s',
                        user)
                 user = None
+            # give an HTTP 401 for authentication failure
+            print 'Status: 401 Unauthorized'
         loginpage(mlist, doc, user, language)
         print doc.Format()
         return

=== modified file 'Mailman/Cgi/private.py'
--- Mailman/Cgi/private.py	2010-01-22 04:39:56 +0000
+++ Mailman/Cgi/private.py	2010-02-05 01:23:54 +0000
@@ -131,6 +131,8 @@
         if cgidata.has_key('submit'):
             # This is a re-authorization attempt
             message = Bold(FontSize('+1', _('Authorization failed.'))).Format()
+            # give an HTTP 401 for authentication failure
+            print 'Status: 401 Unauthorized'
         # Output the password form
         charset = Utils.GetCharSet(mlist.preferred_language)
         print 'Content-type: text/html; charset=' + charset + '\n\n'

=== modified file 'NEWS'
--- NEWS	2010-01-28 23:06:44 +0000
+++ NEWS	2010-02-05 01:23:54 +0000
@@ -13,6 +13,9 @@
 
   Bug Fixes and other patches
 
+    - We now give an HTTP 401 status for authentication failures from admin,
+      admindb, private and options logins.
+
     - Backported the listinfo template change from the 2.2 branch to fix
       Bug #514050.
 

_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to