Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
3faf8291
Commit
3faf8291
authored
Jan 27, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_core: parse actual_url
parent
582b0bc5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_auto_logout/ERP5Site_getAuthCookieSameSite.xml
...skins/erp5_auto_logout/ERP5Site_getAuthCookieSameSite.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_auto_logout/setAuthCookie.py
...mplateItem/portal_skins/erp5_auto_logout/setAuthCookie.py
+7
-2
No files found.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_auto_logout/ERP5Site_getAuthCookieSameSite.xml
View file @
3faf8291
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
host=None, port=None, path=None
</string>
</value>
<value>
<string>
scheme, hostname, port, path
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_auto_logout/setAuthCookie.py
View file @
3faf8291
from
urlparse
import
urlparse
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
kw
=
{}
kw
=
{}
expire_interval
=
portal
.
portal_preferences
.
getPreferredMaxUserInactivityDuration
()
expire_interval
=
portal
.
portal_preferences
.
getPreferredMaxUserInactivityDuration
()
...
@@ -17,8 +19,11 @@ portal.portal_sessions[
...
@@ -17,8 +19,11 @@ portal.portal_sessions[
][
'ac_renew'
]
=
ac_renew
][
'ac_renew'
]
=
ac_renew
REQUEST
=
portal
.
REQUEST
REQUEST
=
portal
.
REQUEST
parse_dict
=
urlparse
(
REQUEST
.
other
.
get
(
'ACTUAL_URL'
))
same_site
=
portal
.
ERP5Site_getAuthCookieSameSite
(
host
=
REQUEST
.
environ
.
get
(
'HTTP_HOST'
))
same_site
=
portal
.
ERP5Site_getAuthCookieSameSite
(
scheme
=
parse_dict
.
scheme
,
hostname
=
parse_dict
.
hostname
,
port
=
parse_dict
.
port
,
path
=
parse_dict
.
path
)
if
same_site
not
in
(
'None'
,
'Lax'
,
'Strict'
):
if
same_site
not
in
(
'None'
,
'Lax'
,
'Strict'
):
# Do not use the SameSite attribute
# Do not use the SameSite attribute
same_site
=
None
same_site
=
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