Bugzilla – Attachment 154144 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), 15.66 KB, created by
Alex Buckley
on 2023-08-01 23:38:22 UTC
(
hide
)
Description:
Bug 33259: (follow-up) Use different speechmarks to prevent errors
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2023-08-01 23:38:22 UTC
Size:
15.66 KB
patch
obsolete
>From f7128df40e50c053278b1c485051a94e02056caa 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 >--- > .../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 | 11 +++++------ > .../prog/en/modules/cataloguing/addbooks.tt | 2 +- > .../prog/en/modules/cataloguing/cataloging-home.tt | 2 +- > .../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, 22 insertions(+), 23 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 5bab762f06e..2699eadaa3e 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 e2470b89823..22fddbe6ecb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >@@ -1226,7 +1226,7 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr > $( '#switch-editor' ).click( function() { > 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 6c683fbf783..5d504b7b3a8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >@@ -325,7 +325,7 @@ MARC frameworks › Administration › Koha > })); > $("#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 d2f826af313..0e9f930bc60 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -143,7 +143,7 @@ > > if ( !confirm( breedingid ? _("This record cannot be transferred to the advanced editor. Continue?") : _("Any changes will not be saved. Continue?") ) ) return false; > >- 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') %]" } ); > > var biblionumber = [% biblionumber || "null" | html %]; > >@@ -512,12 +512,11 @@ function PopupMARCFieldDoc(field) { > 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'); > } > } >@@ -526,12 +525,12 @@ function PopupMARCFieldDoc(field) { > 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 d2ac8004c91..12bb2f5c7e9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >@@ -295,7 +295,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 f19064481a7..369b9fd4362 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 >@@ -236,7 +236,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 78a5c5a355d..466274ef4db 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt >@@ -235,7 +235,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 29acf63c839..d24a92b108f 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 3e96707efc8..cffcd70269f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -265,7 +265,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 abc08a3390a..e042e2c269b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/members-menu.js >@@ -160,6 +160,6 @@ function printx_window(print_type) { > 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 957a87321c0..a979d5f216b 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 68d89cf54f8..6d3bb40eea7 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt >@@ -524,18 +524,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.20.1
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