A plugin that requires POSTing to plugins/run.pl will prompt authentication, but after authentication is performed, it gets dropped after the next subsequent page navigation thus causing the whole thing to fail.
Created attachment 185399 [details] [review] 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.
Created attachment 185493 [details] [review] 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>
I don't really see the point of having output_html in Koha/Plugins/Base.pm, but since we do... I think this is a reasonable change.
Created attachment 185845 [details] [review] 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> Signed-off-by: David Cook <dcook@prosentient.com.au>
Nice work everyone! Pushed to main for 25.11
Nice work everyone! Pushed to 25.05.x
I prefer not impact 24.11.x on authentication