Commit 958ef680 authored by Romain Courteaud's avatar Romain Courteaud

erp5_core: parse actual_url

parent c34b4b2b
...@@ -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>
......
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
......
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