Bugzilla – Attachment 187160 Details for
Bug 40920
Checkout endpoint crashes with parameter "patron_id"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40920: fix invalid patron_id parameter
Bug-40920-fix-invalid-patronid-parameter.patch (text/plain), 1.10 KB, created by
Arthur Suzuki
on 2025-10-01 07:28:47 UTC
(
hide
)
Description:
Bug 40920: fix invalid patron_id parameter
Filename:
MIME Type:
Creator:
Arthur Suzuki
Created:
2025-10-01 07:28:47 UTC
Size:
1.10 KB
patch
obsolete
>From 817f7a1cce694a7ee1a4258c02c60cc6f989e851 Mon Sep 17 00:00:00 2001 >From: Arthur Suzuki <arthur.suzuki@biblibre.com> >Date: Tue, 30 Sep 2025 19:13:20 +0000 >Subject: [PATCH] Bug 40920: fix invalid patron_id parameter > >Test plan: >- on KTD, without patch, create an issue for user "koha" (patron_id 51) >- go to http://localhost:8081/api/v1/checkouts?patron_id=51 >- you should get an error (and no issues) >- in /var/log/koha/plack-api-error.log you will see "Unknown column 'patron_id'". >- apply patch and "restart_all" >- make the same request to the api >- you should see the issue for user koha. >--- > Koha/REST/V1/Checkouts.pm | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/Koha/REST/V1/Checkouts.pm b/Koha/REST/V1/Checkouts.pm >index 3d8702372a..3d0094567a 100644 >--- a/Koha/REST/V1/Checkouts.pm >+++ b/Koha/REST/V1/Checkouts.pm >@@ -50,6 +50,9 @@ sub list { > my $checked_in = $c->param('checked_in'); > $c->req->params->remove('checked_in'); > >+ $c->req->params->append(borrowernumber => $c->param('patron_id')); >+ $c->req->params->remove('patron_id'); >+ > try { > my $checkouts_set; > >-- >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 40920
: 187160