Bugzilla – Attachment 123280 Details for
Bug 28779
Calling request.pl with non-existent biblionumber gives internal server error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28779: Skip processing of non-existent biblios
Bug-28779-Skip-processing-of-non-existent-biblios.patch (text/plain), 1.21 KB, created by
Joonas Kylmälä
on 2021-07-29 09:48:28 UTC
(
hide
)
Description:
Bug 28779: Skip processing of non-existent biblios
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2021-07-29 09:48:28 UTC
Size:
1.21 KB
patch
obsolete
>From f6a86f9e55f26c9816a78396c3c458331afc52fb Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@helsinki.fi> >Date: Thu, 29 Jul 2021 09:42:09 +0000 >Subject: [PATCH] Bug 28779: Skip processing of non-existent biblios > >Just checking with a regex that whether an input looks like a biblionumber >is not enough, we need to also verify there is a biblio really existing >in the database and skip processing of hold request for non-existent >biblionumbers. > >To test: > 1) Go to page /cgi-bin/koha/reserve/request.pl?biblionumbers=XXXXX > where XXXXX is non-existent biblionumber, notice internal server error > 2) Apply patch > 3) Repeat step 1 and notice we are greeted with a reserve page > for no particular biblio (same behavior if you inputted a non- > integer value) >--- > reserve/request.pl | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/reserve/request.pl b/reserve/request.pl >index a6fbe528f4..55f528d0e1 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -307,6 +307,7 @@ foreach my $biblionumber (@biblionumbers) { > my %biblioloopiter = (); > > my $biblio = Koha::Biblios->find( $biblionumber ); >+ next unless $biblio; > > my $force_hold_level; > if ( $patron ) { >-- >2.25.1
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 28779
:
123280
|
123285
|
123304
|
123330
|
123331
|
123370
|
123371
|
123690
|
123691
|
123692