Bug 18538 - OPAC database user login internal server error
Summary: OPAC database user login internal server error
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Lari Taskula
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-04 13:17 UTC by Lari Taskula
Modified: 2023-09-15 20:03 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 18538: OPAC databse user login internal server error (1.25 KB, patch)
2017-05-04 13:20 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 18538: OPAC databse user login internal server error (1.42 KB, patch)
2017-05-04 16:23 UTC, Marc Véron
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lari Taskula 2017-05-04 13:17:15 UTC
Reproduce:
1. Go to OPAC
2. Login with the database user
3. Observe Internal Server Error

Check your logs:
Can't call method "is_debarred" on an undefined value at /home/koha/kohaclone/opac/opac-user.pl line 96.
Comment 1 Lari Taskula 2017-05-04 13:20:35 UTC
Created attachment 63101 [details] [review]
Bug 18538: OPAC databse user login internal server error

Reproduce:
1. Go to OPAC
2. Login with the database user
3. Observe Internal Server Error

Check your logs:
Can't call method "is_debarred" on an undefined value at
/home/koha/kohaclone/opac/opac-user.pl line 96.

This patch fixes the mentioned crash.

To test:
1. Reproduce the issue with above test plan
2. Apply this patch
3. Go to OPAC
4. Login with the database user
5. Observe successful login
Comment 2 Marc Véron 2017-05-04 16:23:56 UTC
Created attachment 63134 [details] [review]
Bug 18538: OPAC databse user login internal server error

Reproduce:
1. Go to OPAC
2. Login with the database user
3. Observe Internal Server Error

Check your logs:
Can't call method "is_debarred" on an undefined value at
/home/koha/kohaclone/opac/opac-user.pl line 96.

This patch fixes the mentioned crash.

To test:
1. Reproduce the issue with above test plan
2. Apply this patch
3. Go to OPAC
4. Login with the database user
5. Observe successful login

Bug reproduced, is fixed by this patch.
Signed-off-by: Marc Véron <veron@veron.ch>
Comment 3 Jonathan Druart 2017-05-08 15:47:46 UTC
Why do you want to login at the OPAC with the DB user?
Comment 4 Lari Taskula 2017-05-08 15:54:07 UTC
(In reply to Jonathan Druart from comment #3)
> Why do you want to login at the OPAC with the DB user?

I was wondering the same, but previously it has been possible with a warning message displayed for the user. This error was caught by one of our PageObject tests.
Comment 5 Jonathan Druart 2017-05-08 16:16:48 UTC
I'd prefer to handle the error (more or less gracefully) raising an exception from C4::Auth, rather than assuming that it's possible to login with this user.
Comment 6 Jonathan Druart 2017-05-18 15:11:59 UTC
(In reply to Jonathan Druart from comment #5)
> I'd prefer to handle the error (more or less gracefully) raising an
> exception from C4::Auth, rather than assuming that it's possible to login
> with this user.

Make me think to "Bug 18403: Add sub output_and_exit_if_error - unknown_patron
 & cannot_see_patron_infos"
Comment 7 Katrin Fischer 2023-09-15 20:03:13 UTC
I can't replicate the internal server error in current versions. I only get:

Staff:
Error: Invalid username or password

OPAC:
You entered an incorrect username or password. 

I believe this is ok then.