From db710ac34503cf99b6ddde0804dae068dd4229e9 Mon Sep 17 00:00:00 2001 From: Chris Hines <chris.hines@monash.edu> Date: Wed, 7 Aug 2019 11:23:51 +0800 Subject: [PATCH] make cookies SameSite=strict in the hopes that safari will start sending them --- TES/tes/apiendpoints.py | 2 +- TWS/twsproxy/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/TES/tes/apiendpoints.py b/TES/tes/apiendpoints.py index 16f401c..a3cd957 100644 --- a/TES/tes/apiendpoints.py +++ b/TES/tes/apiendpoints.py @@ -475,7 +475,7 @@ class CreateTunnel(Resource): localbind=localbind, authtok=authtok) response = make_response("") response.mime_type = 'application/json' - response.set_cookie('twsproxyauth', authtok, httponly=True,samesite='Strict') + response.set_cookie('twsproxyauth', authtok, httponly=True,samesite='Lax') logger.debug('JobConnect.connect: connecting via redirect with cookie authtok set to {}'.format(authtok)) return response diff --git a/TWS/twsproxy/__init__.py b/TWS/twsproxy/__init__.py index 23cf9d7..42e8dc3 100644 --- a/TWS/twsproxy/__init__.py +++ b/TWS/twsproxy/__init__.py @@ -94,7 +94,7 @@ class TWSProxy(threading.Thread): initshutdown.clear() (header, bytessofar) = self.inittws(initshutdown) if self.authtok is not None: - replyheader = b'Set-Cookie: twsproxyauth2='+self.authtok+b' ; HttpOnly; SameSite=Strict\r\n' + replyheader = b'Set-Cookie: twsproxyauth2='+self.authtok+b' ; HttpOnly; SameSite=Lax; Path=/ \r\n' else: replyheader = None insertafter = b'HTTP/1.1 200 OK\r\n' -- GitLab