Summary: | Log in via the itemsearch URL leads to Internal Server Error | ||
---|---|---|---|
Product: | Koha | Reporter: | Christian Stelzenmüller <christian.stelzenmueller> |
Component: | Cataloging | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | david, dcook, fridolin.somers, jonathan.druart, julian.maurice, kyle, m.de.rooy, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
When trying to access the item search form in the staff interface (/cgi-bin/koha/catalogue/itemsearch.pl) when not logged in, an internal server error (error code 500) is received after entering your login details. This fixes the problem so that the item search form is displayed as expected.
|
Version(s) released in: |
21.11.00,21.05.01,20.11.07
|
Circulation function: | |||
Attachments: |
Bug 28383: Fix itemsearch when accessed from the login form
Bug 28383: Fix itemsearch when accessed from the login form Bug 28383: Fix itemsearch when accessed from the login form |
Description
Christian Stelzenmüller
2021-05-19 08:35:43 UTC
Oh crap indeed. I think it comes from : my $cgi = CGI->new; my %params = $cgi->Vars; ... if (scalar keys %params > 0) { # Parameters given, it's a search In case of authentication, user and password are params. Maybe we can test if $format param is defined. Created attachment 121819 [details] [review] Bug 28383: Fix itemsearch when accessed from the login form There are params here (credentials), we need to test for the existence of $format. Test plan: logout access /cgi-bin/koha/catalogue/itemsearch.pl Login => Without this patch you get a 500 (because we hit the exit statement) => With this patch you see the items search form. Created attachment 121893 [details] [review] Bug 28383: Fix itemsearch when accessed from the login form There are params here (credentials), we need to test for the existence of $format. Test plan: logout access /cgi-bin/koha/catalogue/itemsearch.pl Login => Without this patch you get a 500 (because we hit the exit statement) => With this patch you see the items search form. Signed-off-by: David Nind <david@davidnind.com> Created attachment 121932 [details] [review] Bug 28383: Fix itemsearch when accessed from the login form There are params here (credentials), we need to test for the existence of $format. Test plan: logout access /cgi-bin/koha/catalogue/itemsearch.pl Login => Without this patch you get a 500 (because we hit the exit statement) => With this patch you see the items search form. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> (As a side note, this makes me think about how it would be good if we had 1 login point like "/cgi-bin/koha/login" which then redirected you back to your entrypoint after successful login) Pushed to master for 21.11, thanks to everybody involved! Pushed to 21.05.x for 21.05.01 Pushed to 20.11.x for 20.11.07 Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed. |