Bugzilla – Attachment 148577 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: Add SameSiteSessionCookie system preference
Bug-33259-Add-SameSiteSessionCookie-system-prefere.patch (text/plain), 4.76 KB, created by
Alex Buckley
on 2023-03-22 23:36:47 UTC
(
hide
)
Description:
Bug 33259: Add SameSiteSessionCookie system preference
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2023-03-22 23:36:47 UTC
Size:
4.76 KB
patch
obsolete
>From 87db50d7b3812a85304fbf9212e288eda32645c7 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Thu, 23 Mar 2023 09:57:11 +1300 >Subject: [PATCH] Bug 33259: Add SameSiteSessionCookie system preference > >Sponsored-by: Toi Ohomai Institute of Technology, New Zealand >--- > .../bug_33259-add_SameSiteSessionCookie_syspref.pl | 14 ++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 2 ++ > .../prog/en/modules/admin/preferences/admin.pref | 8 ++++++++ > 3 files changed, 24 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_33259-add_SameSiteSessionCookie_syspref.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_33259-add_SameSiteSessionCookie_syspref.pl b/installer/data/mysql/atomicupdate/bug_33259-add_SameSiteSessionCookie_syspref.pl >new file mode 100755 >index 00000000000..1a7ab491fcf >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_33259-add_SameSiteSessionCookie_syspref.pl >@@ -0,0 +1,14 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "33259", >+ description => "Bug 33259: Optionally set SameSite attribute of cookie to Strict", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ >+ $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('SameSiteSessionCookie', '0', NULL, 'If Strict, then the SameSite attribute of the session cookie will be set to Strict, rather than the default Lax', 'YesNo') }); >+ >+ say $out "Added new system preference 'SameSiteSessionCookie'"; >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 98eced6bc0a..26061235eb4 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -636,6 +636,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('RoutingListAddReserves','0','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'), > ('RoutingListNote','To change this note edit <a href=\"/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RoutingListNote#jumped\">RoutingListNote</a> system preference.','70|10','Define a note to be shown on all routing lists','Textarea'), > ('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'), >+('SameSiteSessionCookie', '0', NULL, 'If Strict, then the SameSite attribute of the session cookie will be set to Strict, rather than the default Lax', 'YesNo'), > ('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo'), > ('SCOAllowCheckin','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'), > ('SCOMainUserBlock','','70|10','Add a block of HTML that will display on the self checkout screen','Textarea'), >@@ -667,6 +668,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('ShowAllCheckins', '0', '', 'Show all checkins', 'YesNo'), > ('ShowComponentRecords', 'nowhere', 'nowhere|staff|opac|both','In which record detail pages to show list of the component records, as linked via 773','Choice'), > ('MaxComponentRecords', '300', '','Max number of component records to display','Integer'), >+('SameSiteSessionCookie', '0', NULL, 'If Strict, then the SameSite attribute of the session cookie will be set to Strict, rather than the default Lax', 'YesNo'), > ('ShowHeadingUse', '0', NULL, 'Show whether authority record contains an established heading that conforms to descriptive cataloguing rules, and can therefore be used as a main/added entry, or subject, or series title', 'YesNo'), > ('showLastPatron','0','','If ON, enables the last patron feature in the intranet','YesNo'), > ('ShowPatronImageInWebBasedSelfCheck','0','','If ON, displays patron image when a patron uses web-based self-checkout','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >index c25ee189628..d2002961fc8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >@@ -480,3 +480,11 @@ Administration: > "ARRAY": "Searchable array" > - <br>ISO2709 format is recommended as it is faster and takes less space, whereas array format makes the full MARC record searchable. > - <br><strong>NOTE:</strong> Making the full record searchable may have a negative effect on relevance ranking of search results. >+ Session cookie: >+ - >+ - "Set the SameSite attribute of the session cookie to: " >+ - pref: SameSiteSessionCookie >+ default: 0 >+ choices: >+ 0: Lax >+ 1: Strict >-- >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