From 094622ca6c27aa853bcd6296956edb2e32b55c61 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 24 Apr 2023 10:23:19 +0000 Subject: [PATCH] Bug 33597: Get rid of warning about intranet_bib_list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolve: Cookie “intranet_bib_list” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. basket_22.1200022.js:67:65 Test plan: Do not apply this patch. Logout from staff. Check browser console warnings. Apply this patch. Login and logout again. Check warnings again. Signed-off-by: Marcel de Rooy Signed-off-by: Nick Clemens --- koha-tmpl/intranet-tmpl/prog/js/basket.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/basket.js b/koha-tmpl/intranet-tmpl/prog/js/basket.js index fa03d434ca..f72d58452b 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/basket.js +++ b/koha-tmpl/intranet-tmpl/prog/js/basket.js @@ -62,9 +62,9 @@ function delCookie(name) { var exp = new Date(); exp.setTime(exp.getTime()-1); if(parent.opener){ - parent.opener.document.cookie = name + "=null; path=/; expires=" + exp.toGMTString(); + parent.opener.document.cookie = name + "=null; SameSite=Lax; path=/; expires=" + exp.toGMTString(); } else { - document.cookie = name + "=null; path=/; expires=" + exp.toGMTString(); + document.cookie = name + "=null; SameSite=Lax; path=/; expires=" + exp.toGMTString(); } } -- 2.30.2