[Zope-CVS] CVS: Products/PluggableAuthService/plugins - CookieAuthHelper.py:1.7

Lennart Regebro regebro at nuxeo.com
Fri Sep 24 12:49:18 EDT 2004


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

Modified Files:
	CookieAuthHelper.py 
Log Message:
Updated CookieAuthHelper to the new challenge implementation.


=== Products/PluggableAuthService/plugins/CookieAuthHelper.py 1.6 => 1.7 ===
--- Products/PluggableAuthService/plugins/CookieAuthHelper.py:1.6	Wed Sep 22 05:43:29 2004
+++ Products/PluggableAuthService/plugins/CookieAuthHelper.py	Fri Sep 24 12:49:18 2004
@@ -168,13 +168,6 @@
     security.declarePrivate('unauthorized')
     def unauthorized(self):
         resp = self.REQUEST['RESPONSE']
-        # No errors of any sort may propagate, and we don't care *what*
-        # they are, even to log them.
-        try: del resp.unauthorized
-        except: pass
-        try: del resp._unauthorized
-        except: pass
-
         # If we set the auth cookie before, delete it now.
         if resp.cookies.has_key(self.cookie_name):
             del resp.cookies[self.cookie_name]
@@ -182,9 +175,10 @@
         # Redirect if desired.
         url = self.getLoginURL()
         if url is not None:
-            raise 'Redirect', url
+            response.redirect(url)
+            return 1
 
-        # Fall through to the standard unauthorized() call.
+        # Could not challenge.
         return 0
 
 



More information about the Zope-CVS mailing list