Bugzilla – Attachment 180954 Details for
Bug 22322
Self-checkin module should provide for automatic logins (like self-checkout)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22322: Don't log login failure to action_logs when page is refreshed
0002-Bug-22322-Don-t-log-login-failure-to-action_logs.patch (text/plain), 2.06 KB, created by
Emmi Takkinen
on 2025-04-15 09:39:13 UTC
(
hide
)
Description:
Bug 22322: Don't log login failure to action_logs when page is refreshed
Filename:
MIME Type:
Creator:
Emmi Takkinen
Created:
2025-04-15 09:39:13 UTC
Size:
2.06 KB
patch
obsolete
>From 2db20be493c358f99ab6ac6d979778b24c592c2e Mon Sep 17 00:00:00 2001 >From: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> >Date: Tue, 15 Apr 2025 11:11:09 +0300 >Subject: [PATCH 2/2] Bug 22322: Don't log login failure to action_logs when > page is refreshed > >If sysprefs AuthFailureLog and SelfCheckoutByLogin >are enabled and one logs in to the SCO from OPAC >or refreshes the SCOs login page, this is added to the >action_logs table as an authentication failure. >We shouldn't log when this happens since these are >not real login attempts. > >To test: >1. Make sure you have AuthFailureLog enabled. >2. Check how many rows are returned from database >with following query: >SELECT count(*) FROM action_logs WHERE module = "AUTH" >and action = "FAILURE"; >3. Enable syspref SelfCheckoutByLogin. >4. Navigate to SCO page and login to OPAC when asked. >5. After SCO login page is displayed, check database again. >=> Result has now increased by 1. >6. Refresh page. >=> Result has again increased by 1. >7. Apply this patch, restart services if needed. >8. Login to SCO again from OPAC again or just refresh the page. >9. Check database. >=> Confirm that result hasn't increased. >10. Refresh page and check database. >=> Confirm that result hasn't increased. >11. Confirm that login to SCO still works as it should. > >Sponsored-by: Koha-Suomi Oy >--- > opac/sco/sco-main.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl >index b94299ade1..a33e539922 100755 >--- a/opac/sco/sco-main.pl >+++ b/opac/sco/sco-main.pl >@@ -121,7 +121,7 @@ my $issuer = Koha::Patrons->find($issuerid)->unblessed; > > my $patronid = $jwt ? Koha::Token->new->decode_jwt( { token => $jwt } ) : undef; > unless ($patronid) { >- if ( C4::Context->preference('SelfCheckoutByLogin') ) { >+ if ( C4::Context->preference('SelfCheckoutByLogin') && $op eq "cud-login" ) { > ( undef, $patronid ) = checkpw( $patronlogin, $patronpw ); > } else { # People should not do that unless they know what they are doing! > # SelfCheckAllowByIPRanges MUST be configured >-- >2.34.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 22322
:
123299
|
139170
|
140162
|
143764
|
150770
|
150776
|
161722
|
161723
|
165722
|
165723
|
178815
|
179010
|
180953
| 180954