[Zope-CVS] CVS: Products/PluggableAuthService - PluggableAuthService.py:1.14

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


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

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


=== Products/PluggableAuthService/PluggableAuthService.py 1.13 => 1.14 ===
--- Products/PluggableAuthService/PluggableAuthService.py:1.13	Mon Sep 13 12:57:11 2004
+++ Products/PluggableAuthService/PluggableAuthService.py	Wed Sep 22 05:43:28 2004
@@ -1089,20 +1089,24 @@
     def __call__(self, container, req):
         """ The __before_publishing_traverse__ hook. """
         resp = req['RESPONSE']
-        resp.old_unauthorized = resp._unauthorized
-        resp._unauthorized = self.challenge
+        resp.old_unauthorized = resp.unauthorized
+        resp.unauthorized = self.challenge
         return
 
     def challenge(self):
+        
         req = self.REQUEST
         resp = req['RESPONSE']
-        resp.old_unauthorized()
+        resp._unauthorized()
         
         # Go through all challenge plugins
         plugins = self._getOb('plugins')
         challengers = plugins.listPlugins( IChallengePlugin )
         for challenger_id, challenger in challengers:
             challenger.challenge(req, resp)
+            
+        # No plugin challenged, fallback to default challenge
+        resp.old_unauthorized()
         
     security.declarePublic( 'hasUsers' )
     def hasUsers(self):



More information about the Zope-CVS mailing list