From b2855e26d46d151fba1ba8deae8f91e950452815 Mon Sep 17 00:00:00 2001 From: David Cook Date: Wed, 21 Feb 2024 01:50:24 +0000 Subject: [PATCH] Bug 36102: Fix removal of cookie from the installer session on upgrades Signed-off-by: Jonathan Druart --- installer/install.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/installer/install.pl b/installer/install.pl index afb8015d9c..275954359a 100755 --- a/installer/install.pl +++ b/installer/install.pl @@ -233,7 +233,11 @@ elsif ( $step && $step == 3 ) { my $cookie_mgr = Koha::CookieManager->new; # Remove cookie of the installer session - $cookie = $cookie_mgr->replace_in_list( $cookie, $query->cookie( + my $cookies = []; + if ( !ref $cookie ) { + push( @$cookies, $cookie ); + } + $cookies = $cookie_mgr->replace_in_list( $cookies, $query->cookie( -name => 'CGISESSID', -value => '', -HttpOnly => 1, @@ -242,7 +246,7 @@ elsif ( $step && $step == 3 ) { )); # we have finished, just redirect to mainpage. - print $query->redirect( -uri => "/cgi-bin/koha/mainpage.pl", -cookie => $cookie ); + print $query->redirect( -uri => "/cgi-bin/koha/mainpage.pl", -cookie => $cookies ); exit; } elsif ( $op eq 'cud-finish' ) { -- 2.39.5