Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
21e0cb63
Commit
21e0cb63
authored
May 11, 2009
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
whitespace cleanup
parent
f08bf6ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/Products/Sessions/BrowserIdManager.py
src/Products/Sessions/BrowserIdManager.py
+5
-5
No files found.
src/Products/Sessions/BrowserIdManager.py
View file @
21e0cb63
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment