Bugzilla – Attachment 150414 Details for
Bug 33597
Get rid of few SameSite warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33597: Fix deleting cookie for holdfor(club)
Bug-33597-Fix-deleting-cookie-for-holdforclub.patch (text/plain), 2.40 KB, created by
Nick Clemens (kidclamp)
on 2023-04-28 18:43:13 UTC
(
hide
)
Description:
Bug 33597: Fix deleting cookie for holdfor(club)
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-04-28 18:43:13 UTC
Size:
2.40 KB
patch
obsolete
>From 1628922e748e90240abaa63ca34a649b1ce598d8 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 24 Apr 2023 10:35:26 +0000 >Subject: [PATCH] Bug 33597: Fix deleting cookie for holdfor(club) >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Resolve: >Cookie âholdforâ 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. > >Did not see warning for holdforclub. But since it is created with Lax, we should remove it with Lax. > >Test plan: >Similar to previous patch. Check console on logout page. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/js/pages/results.js | 4 ++-- > koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/results.js b/koha-tmpl/intranet-tmpl/prog/js/pages/results.js >index 2e381c2260..8ce456e3fd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/pages/results.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/results.js >@@ -356,8 +356,8 @@ function placeHold () { > } > > function forgetPatronAndClub(){ >- Cookies.remove("holdfor", { path: '/' }); >- Cookies.remove("holdforclub", { path: '/' }); >+ Cookies.remove("holdfor", { path: '/', SameSite: 'Lax' }); >+ Cookies.remove("holdforclub", { path: '/', SameSite: 'Lax' }); > $(".holdforlink").remove(); > $("#placeholdc").html("<a class=\"btn btn-default btn-xs placehold\" href=\"#\"><i class=\"fa fa-sticky-note-o\"></i> " + __("Place hold") + "</a>"); > } >diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >index 3b60c4b938..c4890ae20e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >@@ -237,7 +237,7 @@ function checkEnter(e){ //e is event object passed from function invocation > } > > function clearHoldFor(){ >- Cookies.remove("holdfor", { path: '/' }); >+ Cookies.remove("holdfor", { path: '/', SameSite: 'Lax' }); > } > > function logOut(){ >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33597
:
150148
|
150149
|
150150
|
150151
|
150413
| 150414 |
150415