[Zope-CVS] CVS: Products/PluggableAuthService/plugins - CookieAuthHelper.py:1.6 HTTPBasicAuthHelper.py:1.4

Lennart Regebro regebro at nuxeo.com
Wed Sep 22 05:43:29 EDT 2004


Update of /cvs-repository/Products/PluggableAuthService/plugins
In directory cvs.zope.org:/tmp/cvs-serv21754/plugins

Modified Files:
	CookieAuthHelper.py HTTPBasicAuthHelper.py 
Log Message:
Improvements in the challenge implementation, including removing infinite recurses in HTTPBasicAuth and Cokkie plugins.


=== Products/PluggableAuthService/plugins/CookieAuthHelper.py 1.5 => 1.6 ===
--- Products/PluggableAuthService/plugins/CookieAuthHelper.py:1.5	Thu Aug 12 11:15:54 2004
+++ Products/PluggableAuthService/plugins/CookieAuthHelper.py	Wed Sep 22 05:43:29 2004
@@ -185,7 +185,7 @@
             raise 'Redirect', url
 
         # Fall through to the standard unauthorized() call.
-        resp.unauthorized()
+        return 0
 
 
     security.declarePrivate('getLoginURL')


=== Products/PluggableAuthService/plugins/HTTPBasicAuthHelper.py 1.3 => 1.4 ===
--- Products/PluggableAuthService/plugins/HTTPBasicAuthHelper.py:1.3	Thu Aug 12 11:15:54 2004
+++ Products/PluggableAuthService/plugins/HTTPBasicAuthHelper.py	Wed Sep 22 05:43:29 2004
@@ -17,6 +17,8 @@
 $Id$
 """
 
+from zExceptions import Unauthorized
+
 from AccessControl.SecurityInfo import ClassSecurityInfo
 from App.class_init import default__class_init__ as InitializeClass
 from Products.PageTemplates.PageTemplateFile import PageTemplateFile
@@ -90,8 +92,9 @@
 
         """ Challenge the user for credentials.
         """
-        # XXX:  Does this need to check whether we have an HTTP response?
-        response.unauthorized()
+        return 0
+        m = "<strong>You are not authorized to access this resource.</strong>"
+        raise Unauthorized, m
 
     security.declarePrivate( 'resetCredentials' )
     def resetCredentials( self, request, response ):



More information about the Zope-CVS mailing list