From 4a0c055c2051583f414362a85dafbf68e4392696 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Wed, 4 Nov 2020 13:21:28 +0100 Subject: [PATCH] Squashed 'cgilite/' changes from 1462517..06a4763 06a4763 try reading session key from post before trying cookie git-subtree-dir: cgilite git-subtree-split: 06a47630fe85f332628b2c3c6dcf1cedba215862 --- session.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/session.sh b/session.sh index ee5c499..ad31dfd 100755 --- a/session.sh +++ b/session.sh @@ -57,7 +57,7 @@ update_session(){ local session sid time sig serverkey checksig IFS=- read -r sid time sig <<-END - $(COOKIE session) + $(POST session_key || COOKIE session) END serverkey="$(server_key)" @@ -78,6 +78,6 @@ update_session(){ printf %s\\n "${sid}-${time}-${sig}" } -SESSION_ID="$(update_session)" -SET_COOKIE 0 session="$SESSION_ID" Path=/ SameSite=Strict HttpOnly -SESSION_ID="${SESSION_ID%%-*}" +SESSION_KEY="$(update_session)" +SET_COOKIE 0 session="$SESSION_KEY" Path=/ SameSite=Strict HttpOnly +SESSION_ID="${SESSION_KEY%%-*}" -- 2.39.2