From e0a66428ea148b968aaa492077a94c884da6ecdb Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Fri, 17 Apr 2020 00:56:40 +0200 Subject: [PATCH 1/3] [fix] invalid more cookies --- helpers.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers.lua b/helpers.lua index 4ca3b1a..91a31c8 100644 --- a/helpers.lua +++ b/helpers.lua @@ -214,7 +214,7 @@ function delete_redirect_cookie() "; Expires="..expired_time.. "; Secure".. "; HttpOnly".. - "; SameSite=Lax ;;" + "; SameSite=Lax" ngx.header["Set-Cookie"] = "SSOwAuthRedirect=;" ..cookie_str end From e4b415a64e9d1346bba4f464bbeaa09d937fc209 Mon Sep 17 00:00:00 2001 From: SilverViper Date: Thu, 30 Apr 2020 15:45:41 +0200 Subject: [PATCH 2/3] Remove all ;; in Set-Cookie --- helpers.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpers.lua b/helpers.lua index 91a31c8..c6bf93c 100644 --- a/helpers.lua +++ b/helpers.lua @@ -177,7 +177,7 @@ function set_auth_cookie(user, domain) "; Expires="..os.date("%a, %d %b %Y %X UTC", expire).. "; Secure".. "; HttpOnly".. - "; SameSite=Lax ;;" + "; SameSite=Lax" ngx.header["Set-Cookie"] = { "SSOwAuthUser="..user..cookie_str, @@ -197,7 +197,7 @@ function delete_cookie() "; Expires="..expired_time.. "; Secure".. "; HttpOnly".. - "; SameSite=Lax ;;" + "; SameSite=Lax" ngx.header["Set-Cookie"] = { "SSOwAuthUser="..cookie_str, "SSOwAuthHash="..cookie_str, From 728620778e959b5c9b21571934f70e308fb97620 Mon Sep 17 00:00:00 2001 From: SilverViper Date: Thu, 30 Apr 2020 17:39:07 +0200 Subject: [PATCH 3/3] prevent SSOwAuthRedirect=;; --- helpers.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers.lua b/helpers.lua index c6bf93c..e8a46e5 100644 --- a/helpers.lua +++ b/helpers.lua @@ -215,7 +215,7 @@ function delete_redirect_cookie() "; Secure".. "; HttpOnly".. "; SameSite=Lax" - ngx.header["Set-Cookie"] = "SSOwAuthRedirect=;" ..cookie_str + ngx.header["Set-Cookie"] = "SSOwAuthRedirect=" ..cookie_str end