Commit d1393a56 authored by Romain Courteaud's avatar Romain Courteaud

erp5_core: parse actual_url

parent 0f61a159
......@@ -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>
......
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
......
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