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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
d1393a56
Commit
d1393a56
authored
Jan 27, 2020
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_core: parse actual_url
parent
0f61a159
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 @
d1393a56
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<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>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_auto_logout/setAuthCookie.py
View file @
d1393a56
from
urlparse
import
urlparse
portal
=
context
.
getPortalObject
()
kw
=
{}
expire_interval
=
portal
.
portal_preferences
.
getPreferredMaxUserInactivityDuration
()
...
...
@@ -17,8 +19,11 @@ portal.portal_sessions[
][
'ac_renew'
]
=
ac_renew
REQUEST
=
portal
.
REQUEST
same_site
=
portal
.
ERP5Site_getAuthCookieSameSite
(
host
=
REQUEST
.
environ
.
get
(
'HTTP_HOST'
))
parse_dict
=
urlparse
(
REQUEST
.
other
.
get
(
'ACTUAL_URL'
))
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'
):
# Do not use the SameSite attribute
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