Bugzilla – Attachment 160789 Details for
Bug 33259
Optionally set SameSite attribute of cookie to Strict
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33259: (follow-up) Use different speechmarks to prevent errors
Bug-33259-follow-up-Use-different-speechmarks-to-p.patch (text/plain), 14.97 KB, created by
Lucas Gass (lukeg)
on 2024-01-10 21:21:15 UTC
(
hide
)
Description:
Bug 33259: (follow-up) Use different speechmarks to prevent errors
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-01-10 21:21:15 UTC
Size:
14.97 KB
patch
obsolete
>From 2a8c0bdf2c0d56fa4fe2db868356e2fa62d09e1d Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Thu, 27 Apr 2023 00:28:57 +0000 >Subject: [PATCH] Bug 33259: (follow-up) Use different speechmarks to prevent > errors > >To test: Confirm the checkouts table for a patron loads successfully > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > .../intranet-tmpl/prog/en/includes/authorities_js.inc | 2 +- > .../intranet-tmpl/prog/en/includes/cateditor-ui.inc | 2 +- > .../prog/en/modules/admin/marctagstructure.tt | 2 +- > .../prog/en/modules/cataloguing/addbiblio.tt | 9 ++++----- > .../prog/en/modules/cataloguing/addbooks.tt | 2 +- > .../prog/en/modules/cataloguing/cataloging-home.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/js/acquisitions-menu.js | 2 +- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 2 +- > koha-tmpl/intranet-tmpl/prog/js/members-menu.js | 2 +- > koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js | 8 ++++---- > .../opac-tmpl/bootstrap/en/modules/opac-advsearch.tt | 8 ++++---- > 12 files changed, 21 insertions(+), 22 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities_js.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities_js.inc >index 2edc0cfc90..a3c6e17074 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities_js.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities_js.inc >@@ -12,7 +12,7 @@ function mergeAuth(authid, summary) { > } > window.location.href = "/cgi-bin/koha/authorities/merge.pl?authid=" + authid + "&authid=" + alreadySelected.authid + refstring; > } else { >- Cookies.set('auth_to_merge', JSON.stringify({ 'authid': authid, 'summary': summary }), { 'path' : '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' }); >+ Cookies.set('auth_to_merge', JSON.stringify({ 'authid': authid, 'summary': summary }), { 'path' : '/', sameSite: "[% Koha.Preference('SameSiteSessionCookie') %]" }); > showMergingInProgress(); > } > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >index 3f08bb8721..1a5299c149 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >@@ -979,7 +979,7 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr > function changeEditor() { > if ( !confirm( _("Any changes will not be saved. Continue?") ) ) return; > >- Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "basic", { expires: 365, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' } ); >+ Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "basic", { expires: 365, path: '/', sameSite: "[% Koha.Preference('SameSiteSessionCookie') %]" } ); > > if ( state.backend == 'catalog' ) { > window.location = '/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=' + state.recordID; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >index adf0de311c..adae2f8188 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >@@ -338,7 +338,7 @@ > })); > $("#select_display").on("change",function(){ > var checked = $(this).prop("checked") ? 1: 0; >- Cookies.set("marctagstructure_selectdisplay", checked, { sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' }); >+ Cookies.set("marctagstructure_selectdisplay", checked, { sameSite: "[% Koha.Preference('SameSiteSessionCookie') %]" }); > this.form.submit(); > }); > }); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >index 0d178ca7d4..814d3100ba 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -543,12 +543,11 @@ $(document).ready(function(){ > function toggleMARCdocLinks(flag){ > if( flag === true ){ > $(".marcdocs").show(); >- >- Cookies.set("marcdocs_[% borrowernumber | html %]",'show', { path: "/", expires: 365, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' }); >+ Cookies.set("marcdocs_[% borrowernumber | html %]",'show', { path: "/", expires: 365, sameSite: "[% Koha.Preference('SameSiteSessionCookie') %]" }); > $("#marcDocsSelect i").addClass('fa-check-square').removeClass('fa-square'); > } else { > $(".marcdocs").hide(); >- Cookies.set("marcdocs_[% borrowernumber | html %]",'hide', { path: "/", expires: 365, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' }); >+ Cookies.set("marcdocs_[% borrowernumber | html %]",'hide', { path: "/", expires: 365, sameSite: "[% Koha.Preference('SameSiteSessionCookie') %]" }); > $("#marcDocsSelect i").removeClass('fa-check-square').addClass('fa-square'); > } > } >@@ -557,12 +556,12 @@ $(document).ready(function(){ > if( flag === true ){ > $(".tagnum").show(); > $(".subfieldcode").show(); >- Cookies.set("marctags_[% borrowernumber | html %]",'show', { path: "/", expires: 365, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' }); >+ Cookies.set("marctags_[% borrowernumber | html %]",'show', { path: "/", expires: 365, sameSite: "[% Koha.Preference('SameSiteSessionCookie') %]" }); > $("#marcTagsSelect i").addClass('fa-check-square').removeClass('fa-square'); > } else { > $(".tagnum").hide(); > $(".subfieldcode").hide(); >- Cookies.set("marctags_[% borrowernumber | html %]",'hide', { path: "/", expires: 365, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' }); >+ Cookies.set("marctags_[% borrowernumber | html %]",'hide', { path: "/", expires: 365, sameSite: "[% Koha.Preference('SameSiteSessionCookie') %]" }); > $("#marcTagsSelect i").removeClass('fa-check-square').addClass('fa-square'); > } > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >index 30eab5a06e..763ef3a442 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >@@ -304,7 +304,7 @@ > }); > > $("#useadvanced").click(function(){ >- Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "advanced", { expires: 365, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' } ); >+ Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "advanced", { expires: 365, path: '/', sameSite: "[% Koha.Preference('SameSiteSessionCookie') %]" } ); > return true; > }); > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt >index aa4ef9f970..1f37d6c707 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt >@@ -249,7 +249,7 @@ > }); > > $("#useadvanced").click(function(){ >- Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "advanced", { expires: 365, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' } ); >+ Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "advanced", { expires: 365, path: '/', sameSite: "[% Koha.Preference('SameSiteSessionCookie') %]" } ); > return true; > }); > }); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt >index 0c0ed35dea..9a0e229fcc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt >@@ -240,7 +240,7 @@ > function SearchToHold(club_id) { > var date = new Date(); > date.setTime(date.getTime() + (10 * 60 * 1000)); >- Cookies.set("holdforclub", club_id, { path: "/", expires: date, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' }); >+ Cookies.set("holdforclub", club_id, { path: "/", expires: date, sameSite: "[% Koha.Preference('SameSiteSessionCookie') %]" }); > location.href="/cgi-bin/koha/catalogue/search.pl"; > } > </script> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/acquisitions-menu.js b/koha-tmpl/intranet-tmpl/prog/js/acquisitions-menu.js >index 29acf63c83..d24a92b108 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/acquisitions-menu.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/acquisitions-menu.js >@@ -3,7 +3,7 @@ function searchToOrder( basketno, vendorid ){ > var cookieData = ""; > date.setTime(date.getTime() + (10 * 60 * 1000)); > cookieData += basketno + "/" + vendorid; >- Cookies.set("searchToOrder", cookieData, { path: "/", expires: date, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' }); >+ Cookies.set("searchToOrder", cookieData, { path: "/", expires: date, sameSite: "[% Koha.Preference('SameSiteSessionCookie') %]" }); > } > > $(document).ready(function() { >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index bb99f6ef9d..22b5a57052 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -289,7 +289,7 @@ $(document).ready(function() { > $('#issues-table-load-delay').hide(); > } > $('#issues-table-load-immediately').on( "change", function(){ >- Cookies.set("issues-table-load-immediately-" + script, $(this).is(':checked'), { expires: 365, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' }); >+ Cookies.set("issues-table-load-immediately-" + script, $(this).is(':checked'), { expires: 365, sameSite: "[% Koha.Preference('SameSiteSessionCookie') %]" }); > }); > > function RefreshIssuesTable() { >diff --git a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js b/koha-tmpl/intranet-tmpl/prog/js/members-menu.js >index b322c559a3..53bde2d9f5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/members-menu.js >@@ -146,6 +146,6 @@ function export_barcodes() { > function searchToHold(){ > var date = new Date(); > date.setTime(date.getTime() + (10 * 60 * 1000)); >- Cookies.set("holdfor", borrowernumber, { path: "/", expires: date, sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' }); >+ Cookies.set("holdfor", borrowernumber, { path: "/", expires: date, sameSite: "[% Koha.Preference('SameSiteSessionCookie') %]" }); > location.href="/cgi-bin/koha/catalogue/search.pl"; > } >diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js b/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js >index 957a87321c..a979d5f216 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js >@@ -52,10 +52,10 @@ function hideColumn(num) { > if (!found) { > valCookie.push(hide); > var cookieString = valCookie.join("/"); >- Cookies.set("showColumns", cookieString, { expires: date, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' }); >+ Cookies.set("showColumns", cookieString, { expires: date, path: '/', sameSite: "[% Koha.Preference('SameSiteSessionCookie') %]" }); > } > } else { >- Cookies.set("showColumns", hide, { expires: date, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' }); >+ Cookies.set("showColumns", hide, { expires: date, path: '/', sameSite: "[% Koha.Preference('SameSiteSessionCookie') %]" }); > } > } > >@@ -88,7 +88,7 @@ function showColumn(num) { > } > if (found) { > var cookieString = valCookie.join("/"); >- Cookies.set("showColumns", cookieString, { expires: date, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' }); >+ Cookies.set("showColumns", cookieString, { expires: date, path: '/', sameSite: "[% Koha.Preference('SameSiteSessionCookie') %]" }); > } > } > } >@@ -113,7 +113,7 @@ function hideAllColumns() { > $("#itemst td:nth-child("+nb_cols+"),#itemst tr th:nth-child("+nb_cols+")").nextAll().hide(); > $("#hideall").prop("checked", true).parent().addClass("selected"); > var cookieString = allColumns.join("/"); >- Cookies.set("showColumns", cookieString, { expires: date, path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' }); >+ Cookies.set("showColumns", cookieString, { expires: date, path: '/', sameSite: "[% Koha.Preference('SameSiteSessionCookie') %]" }); > } > > $(document).ready(function () { >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt >index c88e7d216c..c1e103360a 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt >@@ -519,18 +519,18 @@ $(document).ready(function() { > } > }); > form_serialized = $(this).serialize(); >- Cookies.set("form_serialized", JSON.stringify( form_serialized ), { path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' }); >+ Cookies.set("form_serialized", JSON.stringify( form_serialized ), { path: '/', sameSite: "[% Koha.Preference('SameSiteSessionCookie') %]" }); > form_serialized_limits = [ > $('#language-limit').val(), $('#branchloop').val(), > $('#subtype_audience').val(), $('#subtype_content').val(), > $('#subtype_format').val(), $('#subtype_additional').val(), > $('#locloop').val() > ]; >- Cookies.set("form_serialized_limits", JSON.stringify( form_serialized_limits ),{ path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' }); >+ Cookies.set("form_serialized_limits", JSON.stringify( form_serialized_limits ),{ path: '/', sameSite: "[% Koha.Preference('SameSiteSessionCookie') %]" }); > [% IF ( expanded_options ) %] >- Cookies.set("search_path_code", 'exs', { path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' }); >+ Cookies.set("search_path_code", 'exs', { path: '/', sameSite: "[% Koha.Preference('SameSiteSessionCookie') %]" }); > [% ELSE %] >- Cookies.set("search_path_code", 'ads', { path: '/', sameSite: '[% Koha.Preference('SameSiteSessionCookie') %]' }); >+ Cookies.set("search_path_code", 'ads', { path: '/', sameSite: "[% Koha.Preference('SameSiteSessionCookie') %]" }); > [% END %] > }); > >-- >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 33259
:
148577
|
148578
|
148579
|
148580
|
148589
|
148590
|
150259
|
150557
|
150558
|
150559
|
150560
|
154142
|
154143
|
154144
|
154145
|
160786
|
160787
|
160788
|
160789
|
160790
|
160791
|
160792
|
160793
|
162181
|
162182
|
162183
|
162184
|
162185
|
162186
|
163066
|
163067
|
163068
|
163069
|
163070
|
163071