Bugzilla – Attachment 154469 Details for
Bug 34545
AutoSelfCheckID fails silently if userid is invalid
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34545: Koha should die with an error if AutoSelfCheckID is invalid
Bug-34545-Koha-should-die-with-an-error-if-AutoSel.patch (text/plain), 1.43 KB, created by
Kyle M Hall (khall)
on 2023-08-16 18:37:20 UTC
(
hide
)
Description:
Bug 34545: Koha should die with an error if AutoSelfCheckID is invalid
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-08-16 18:37:20 UTC
Size:
1.43 KB
patch
obsolete
>From 90818a64ef697ca92eb873439f03ee02bf3e2444 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 16 Aug 2023 14:34:15 -0400 >Subject: [PATCH] Bug 34545: Koha should die with an error if AutoSelfCheckID > is invalid > >If AutoSelfCheckID is an not valid ( either by deleting the patron or by changing the patron's userid ), self-checkout will display the login screen and no error will be generated in any logs. > >Test Plan: >1) Apply this patch >2) Verify AutoSelfCheckID is working as expected >3) Change AutoSelfCheckID to an invalid userid >4) Restart all the things! >5) Verify visiting sco-main.pl generates an error! >--- > opac/sco/sco-main.pl | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl >index 9f70a415cc4..2245f44743e 100755 >--- a/opac/sco/sco-main.pl >+++ b/opac/sco/sco-main.pl >@@ -63,6 +63,8 @@ unless ( in_iprange(C4::Context->preference('SelfCheckAllowByIPRanges')) ) { > if (C4::Context->preference('AutoSelfCheckAllowed')) > { > my $AutoSelfCheckID = C4::Context->preference('AutoSelfCheckID'); >+ die "Cannot auto login to self checkout, user $AutoSelfCheckID does not exist!" >+ unless Koha::Patrons->search( { userid => $AutoSelfCheckID } )->count(); > my $AutoSelfCheckPass = C4::Context->preference('AutoSelfCheckPass'); > $query->param(-name=>'userid',-values=>[$AutoSelfCheckID]); > $query->param(-name=>'password',-values=>[$AutoSelfCheckPass]); >-- >2.30.2
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 34545
:
154469
|
154473