Commit 21e0cb63 authored by Andreas Jung's avatar Andreas Jung

whitespace cleanup

parent f08bf6ed
...@@ -332,7 +332,7 @@ class BrowserIdManager(Item, Persistent, Implicit, RoleManager, Owned, Tabs): ...@@ -332,7 +332,7 @@ class BrowserIdManager(Item, Persistent, Implicit, RoleManager, Owned, Tabs):
if not (type(path) is type('') and not badcookiecharsin(path)): if not (type(path) is type('') and not badcookiecharsin(path)):
raise BrowserIdManagerErr,'Bad cookie path %s' % escape(repr(path)) raise BrowserIdManagerErr,'Bad cookie path %s' % escape(repr(path))
self.cookie_path = path self.cookie_path = path
security.declareProtected(ACCESS_CONTENTS_PERM, 'getCookiePath') security.declareProtected(ACCESS_CONTENTS_PERM, 'getCookiePath')
def getCookiePath(self): def getCookiePath(self):
""" """ """ """
...@@ -437,7 +437,7 @@ class BrowserIdManager(Item, Persistent, Implicit, RoleManager, Owned, Tabs): ...@@ -437,7 +437,7 @@ class BrowserIdManager(Item, Persistent, Implicit, RoleManager, Owned, Tabs):
expires = now() + self.cookie_life_days * 86400 expires = now() + self.cookie_life_days * 86400
# Wdy, DD-Mon-YYYY HH:MM:SS GMT # Wdy, DD-Mon-YYYY HH:MM:SS GMT
expires = strftime('%a %d-%b-%Y %H:%M:%S GMT',gmtime(expires)) expires = strftime('%a %d-%b-%Y %H:%M:%S GMT',gmtime(expires))
# cookie attributes managed by BrowserIdManager # cookie attributes managed by BrowserIdManager
d = {'domain':self.cookie_domain,'path':self.cookie_path, d = {'domain':self.cookie_domain,'path':self.cookie_path,
'secure':self.cookie_secure,'http_only': self.cookie_http_only, 'secure':self.cookie_secure,'http_only': self.cookie_http_only,
...@@ -449,14 +449,14 @@ class BrowserIdManager(Item, Persistent, Implicit, RoleManager, Owned, Tabs): ...@@ -449,14 +449,14 @@ class BrowserIdManager(Item, Persistent, Implicit, RoleManager, Owned, Tabs):
return # should we raise an exception? return # should we raise an exception?
if string.split(URL1,':')[0] != 'https': if string.split(URL1,':')[0] != 'https':
return # should we raise an exception? return # should we raise an exception?
cookies = REQUEST.RESPONSE.cookies cookies = REQUEST.RESPONSE.cookies
cookie = cookies[self.browserid_name]= {} cookie = cookies[self.browserid_name]= {}
for k,v in d.items(): for k,v in d.items():
if v: if v:
cookie[k] = v #only stuff things with true values cookie[k] = v #only stuff things with true values
cookie['value'] = bid cookie['value'] = bid
def _setId(self, id): def _setId(self, id):
if id != self.id: if id != self.id:
raise MessageDialog( raise MessageDialog(
...@@ -487,7 +487,7 @@ class BrowserIdManager(Item, Persistent, Implicit, RoleManager, Owned, Tabs): ...@@ -487,7 +487,7 @@ class BrowserIdManager(Item, Persistent, Implicit, RoleManager, Owned, Tabs):
def hasTraversalHook(self, parent): def hasTraversalHook(self, parent):
name = TRAVERSAL_APPHANDLE name = TRAVERSAL_APPHANDLE
return not not queryBeforeTraverse(parent, name) return not not queryBeforeTraverse(parent, name)
class BrowserIdManagerTraverser(Persistent): class BrowserIdManagerTraverser(Persistent):
def __call__(self, container, request, browser_id=None, def __call__(self, container, request, browser_id=None,
browser_id_ns=None, browser_id_ns=None,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment