[Bug 28779] New: Calling request.pl with non-existent biblionumber gives internal server error
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 Bug ID: 28779 Summary: Calling request.pl with non-existent biblionumber gives internal server error Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: joonas.kylmala@helsinki.fi QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com If you try to visit the intranet hold request page and pass a non-existent biblionumber in the biblionumbers paremeter Koha gives internal server error. The URL is (for example):
/cgi-bin/koha/reserve/request.pl?biblionumbers=488
We should handle even the invalid inputs user might give, i.e. here this happened on a previously existing biblio which was recently deleted and the user tried to access it directly from a bookmark and was confused about why Koha doesn't work! -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 --- Comment #1 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 123280 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123280&action=edit 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) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- If there is no record to place a hold on I think we should not allow the user to continue the process. The patron selection form should not appear, and some kind of error message should be displayed. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123280|0 |1 is obsolete| | --- Comment #3 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 123285 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123285&action=edit 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 cannot place a hold -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 --- Comment #4 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- (In reply to Owen Leonard from comment #2)
If there is no record to place a hold on I think we should not allow the user to continue the process. The patron selection form should not appear, and some kind of error message should be displayed.
Addressed this in the new patch. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123285|0 |1 is obsolete| | --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 123304 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123304&action=edit 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 cannot place a hold Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 --- Comment #6 from Owen Leonard <oleonard@myacpl.org> --- Thanks for the follow-up! -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123304|0 |1 is obsolete| | --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 123330 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123330&action=edit 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 cannot place a hold Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 123331 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123331&action=edit Bug 28779: (QA follow-up) More specific message and soem cleanup Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |nick@bywatersolutions.com |y.org | CC| |nick@bywatersolutions.com Assignee|koha-bugs@lists.koha-commun |joonas.kylmala@helsinki.fi |ity.org | --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Can you check my follow-up Joonas? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nugged@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 Peter Vashchuk <stalkernoid@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123330|0 |1 is obsolete| | Attachment #123331|0 |1 is obsolete| | --- Comment #10 from Peter Vashchuk <stalkernoid@gmail.com> --- Created attachment 123370 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123370&action=edit 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 cannot place a hold Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 --- Comment #11 from Peter Vashchuk <stalkernoid@gmail.com> --- Created attachment 123371 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123371&action=edit Bug 28779: (QA follow-up) More specific message and soem cleanup Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cbrannon@cdalibrary.org --- Comment #12 from Owen Leonard <oleonard@myacpl.org> --- *** Bug 24500 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123370|0 |1 is obsolete| | --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 123690 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123690&action=edit 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 cannot place a hold Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123371|0 |1 is obsolete| | --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 123691 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123691&action=edit Bug 28779: (QA follow-up) More specific message and soem cleanup Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 123692 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123692&action=edit Bug 28779: (QA follow-up) Even more specific message For the detail page, the MARC view etc. we use the text: The record you requested does not exist (488). I think this is better than "not found", because that sounds like it might be an issue with the search index, which we can rule out in this case. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #16 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- I think we should add a warning message but let the user continue the process with the available records. No blocking those patches as they are a good enhancement to the current behaviour. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 --- Comment #17 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Pushed to master |Pushed to stable Version(s)|21.11.00 |21.11.00,21.05.03 released in| | --- Comment #18 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Version(s)|21.11.00,21.05.03 |21.11.00,21.05.03,20.11.09 released in| | Status|Pushed to stable |Pushed to oldstable --- Comment #19 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.09 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28779 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED --- Comment #20 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org