[CMF-checkins] CVS: CMF - CookieCrumbler.py:1.4

shane@digicool.com shane@digicool.com
Thu, 12 Apr 2001 15:00:55 -0400 (EDT)


Update of /cvs-repository/CMF/CMFCore
In directory korak:/tmp/cvs-serv27151

Modified Files:
	CookieCrumbler.py 
Log Message:
A few minor corrections.



--- Updated File CookieCrumbler.py in package CMF --
--- CookieCrumbler.py	2001/04/11 21:01:09	1.3
+++ CookieCrumbler.py	2001/04/12 19:00:54	1.4
@@ -158,7 +158,7 @@
         resp.setCookie( cookie_name, cookie_value, path='/')
 
     security.declarePrivate('defaultExpireAuthCookie')
-    def defaultExpireAuthCookie( self, cookie_name ):
+    def defaultExpireAuthCookie( self, resp, cookie_name ):
         resp.expireCookie( cookie_name, path='/')
 
     security.declarePrivate('modifyRequest')
@@ -223,9 +223,10 @@
 
     security.declarePublic('credentialsChanged')
     def credentialsChanged(self, user, name, pw):
-        resp = self.REQUEST['RESPONSE']
         ac = encodestring('%s:%s' % (name, pw))
-        self.setAuthCookie(resp, ac)
+        method = self.getCookieMethod( 'setAuthCookie'
+                                       , self.defaultSetAuthCookie )
+        method( resp, self.auth_cookie, quote( ac ) )
 
     def _cleanupResponse(self):
         resp = self.REQUEST['RESPONSE']
@@ -282,7 +283,7 @@
         resp = req['RESPONSE']
         method = self.getCookieMethod( 'expireAuthCookie'
                                      , self.defaultExpireAuthCookie )
-        method( cookie_name=self.auth_cookie )
+        method( resp, cookie_name=self.auth_cookie )
         redir = 0
         if self.logout_page:
             iself = getattr(self, 'aq_inner', self)