From cd3b5b77baae15293288643d56afd99093a74c40 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Thu, 14 Aug 2025 12:01:53 +0000 Subject: [PATCH] Bug 40653: Add cookie to output_html Test plan, k-t-d, don't apply patch yet: 1) Install a plugin that sends the cookie to output_html e.g.: https://github.com/openfifth/koha-ill-libkey-lending-tool/releases/tag/v2.3.8 2) Log out. Access this plugin's tool link directly: /cgi-bin/koha/plugins/run.pl?class=Koha%3A%3APlugin%3A%3ACom%3A%3APTFSEurope%3A%3AIncDocs&method=tool 3) Notice you're presented the login screen. Login using koha:koha 4) Notice you're shown the plugin's respective tool page. It looks like you're authenticated but you're not. Click on any of the top links e.g. 'Circulation' or 'Patrons'. 5) Notice you're shown the login page again. 6) Apply patch. Repeat. Step 5 should no longer show the login page but instead the page you clicked on. Signed-off-by: Tomas Jiglind Signed-off-by: David Cook --- Koha/Plugins/Base.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/Plugins/Base.pm b/Koha/Plugins/Base.pm index b536aa606d..c5b671437e 100644 --- a/Koha/Plugins/Base.pm +++ b/Koha/Plugins/Base.pm @@ -267,8 +267,8 @@ Note: this is a wrapper function for C4::Output::output_with_http_headers =cut sub output_html { - my ( $self, $data, $status, $extra_options ) = @_; - output_with_http_headers( $self->{cgi}, undef, $data, 'html', $status, $extra_options ); + my ( $self, $data, $status, $extra_options, $cookie ) = @_; + output_with_http_headers( $self->{cgi}, $cookie, $data, 'html', $status, $extra_options ); } =head2 bundle_path -- 2.39.5