From 8b69d0b4d3e72171d9f2d51234f345405a433c4f Mon Sep 17 00:00:00 2001 From: David Cook Date: Thu, 15 Feb 2024 00:35:16 +0000 Subject: [PATCH] Bug 34478: Manual fix - Fix session cookie management of self-checkout Signed-off-by: Jonathan Druart --- opac/sco/sco-main.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl index 7f970717c8..127e2ec394 100755 --- a/opac/sco/sco-main.pl +++ b/opac/sco/sco-main.pl @@ -45,6 +45,7 @@ use Koha::Patron::Images; use Koha::Patron::Messages; use Koha::Plugins; use Koha::Token; +use Koha::CookieManager; my $query = CGI->new; @@ -374,16 +375,15 @@ if ( $patron) { nouser => $patronid, ); } - -$cookie = $query->cookie( +my $cookie_mgr = Koha::CookieManager->new; +$cookie = $cookie_mgr->replace_in_list( $cookie, $query->cookie( -name => 'JWT', -value => $jwt // '', -expires => $jwt ? '+1d' : '', -HttpOnly => 1, -secure => ( C4::Context->https_enabled() ? 1 : 0 ), -sameSite => 'Lax' -); - +)); $template->param(patronid => $patronid); output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 }; -- 2.39.5