Bugzilla – Attachment 162181 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.15 KB, created by
Martin Renvoize
on 2024-02-15 09:15:10 UTC
(
hide
)
Description:
Bug 33259: Add SameSiteSessionCookie system preference
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2024-02-15 09:15:10 UTC
Size:
4.15 KB
patch
obsolete
>From b55ca6e8476fab027618bf6ad8ece0c11f5b5a0b 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 >Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../bug_33259-add_SameSiteSessionCookie_syspref.pl | 14 ++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 1 + > .../prog/en/modules/admin/preferences/admin.pref | 9 +++++++++ > 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..9c5933aab63 >--- /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', 'Lax', 'None|Lax|Strict', 'If Strict, then the SameSite attribute of the session cookie will be set to Strict, rather than the default Lax. None means you want the cookie sent iun a third-party context.', 'Choice') }); >+ >+ say $out "Added new system preference 'SameSiteSessionCookie'"; >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 669074aa506..1c0365c529c 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -668,6 +668,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', 'Lax', 'None|Lax|Strict', 'If Strict, then the SameSite attribute of the session cookie will be set to Strict, rather than the default Lax. None means you want the cookie sent iun a third-party context.', 'Choice'), > ('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'), > ('SCOLoadCheckoutsByDefault','1','','If enabled, load the list of a patrons checkouts when they log in to the 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 84238d0e53f..dcac92de4f9 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 >@@ -487,3 +487,12 @@ 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: Lax >+ choices: >+ None: None >+ Lax: Lax >+ Strict: Strict >-- >2.43.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