Bug 29931: [21.05.x] Check cookie status before continuing
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 24 Jan 2022 10:24:08 +0000 (10:24 +0000)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Wed, 9 Mar 2022 15:09:19 +0000 (15:09 +0000)
commit83af851c5ea33923756816d0810dc89260e5cf66
tree59980e40be742255f23e2520829252c2635784a6
parent0460c46fb1b715750f81781a633311a47c73d96b
Bug 29931: [21.05.x] Check cookie status before continuing

Test plan:
Logout from staff.
Try to run plugins-enable (you should have some active plugin).
Like: https://yourserver:staffport/cgi-bin/koha/plugins/plugins-enable.pl?class=Koha::Plugin::Test&method=enable
Replace class and method as appropriate.
Verify that with this patch, you will be redirected to 401 page.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 29931: (follow-up) Similar thing in opac-patron-image.pl

Although less harmful indeed. No borrowernumber, no image.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested: logged in, logged out, prefs toggled. All fine.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 29931: (follow-up) Fix svc/checkouts and return_claims too

Adding the same auth_status check here too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
opac/opac-patron-image.pl
plugins/plugins-enable.pl
svc/checkouts
svc/return_claims