Bugzilla – Attachment 98141 Details for
Bug 21190
Add logging of successful/unsuccessful login attempts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21190: (follow-up) Save patron id in failure when available
Bug-21190-follow-up-Save-patron-id-in-failure-when.patch (text/plain), 1.28 KB, created by
Michal Denar
on 2020-01-30 09:51:18 UTC
(
hide
)
Description:
Bug 21190: (follow-up) Save patron id in failure when available
Filename:
MIME Type:
Creator:
Michal Denar
Created:
2020-01-30 09:51:18 UTC
Size:
1.28 KB
patch
obsolete
>From 16bbbd00f86ab9b4a5e13abd61474a15d70be4b3 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 30 Jan 2020 09:27:56 +0000 >Subject: [PATCH] Bug 21190: (follow-up) Save patron id in failure when > available > >The wrong password might belong to an existing user. If that is the case, >we have a $patron. >Note that logaction will save the object info but has no user in the >context environment for a failure. > >Test plan: >Login with good user, bad pw and bad user, bad pw. Check logviewer. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Michal Denar <black23@gmail.com> >--- > C4/Auth.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 995772dcb2..71e1bc32ec 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -1875,7 +1875,7 @@ sub checkpw { > if( $patron && $passwd_ok && C4::Context->preference('AuthSuccessLog') ) { > logaction( 'AUTH', 'SUCCESS', $patron->id, "Valid password for $userid", $type ); > } elsif( !$passwd_ok && C4::Context->preference('AuthFailureLog') ) { >- logaction( 'AUTH', 'FAILURE', 0, "Wrong password for $userid", $type ); >+ logaction( 'AUTH', 'FAILURE', $patron ? $patron->id : 0, "Wrong password for $userid", $type ); > } > > return @return; >-- >2.11.0
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 21190
:
94713
|
94714
|
94715
|
94717
|
94732
|
94733
|
94734
|
94735
|
94736
|
94805
|
98067
|
98068
|
98069
|
98070
|
98071
|
98072
|
98073
|
98074
|
98110
|
98111
|
98112
|
98113
|
98114
|
98115
|
98116
|
98117
|
98125
|
98133
|
98134
|
98135
|
98136
|
98137
|
98138
|
98139
|
98140
|
98141
|
101971
|
101972
|
101973
|
101974
|
101975
|
101976
|
101977
|
101978
|
101979
|
102493
|
102494
|
102496
|
102497
|
102498
|
102499
|
102500
|
102501
|
102502
|
123540