Bug 33597: Get rid of warning about intranet_bib_list

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 <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Marcel de Rooy 2023-04-24 10:23:19 +00:00 committed by Tomas Cohen Arazi
parent 18137030ff
commit 95de1f3e92
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -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();
}
}