Bugzilla – Attachment 185493 Details for
Bug 40653
plugins/run.pl controller drops authentication if logging in to that route
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40653: Add cookie to output_html
Bug-40653-Add-cookie-to-outputhtml.patch (text/plain), 1.67 KB, created by
Pedro Amorim
on 2025-08-18 08:36:21 UTC
(
hide
)
Description:
Bug 40653: Add cookie to output_html
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-08-18 08:36:21 UTC
Size:
1.67 KB
patch
obsolete
>From cea2364ca940bcbfeb7f0d34506c704732273ba1 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >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: ><staff_url>/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 <tomas.jiglind@mariestad.se> >--- > 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 b536aa606d4..c5b671437e2 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
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 40653
:
185399
|
185493
|
185845