Bugzilla – Attachment 26024 Details for
Bug 8148
ldap authentication should FAIL if ldap contains NEW password, and user types the PREVIOUS password
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Prevent local authentification fallback if an invalid LDAP password was entered.
SIGNED-OFF-Prevent-local-authentification-fallback.patch (text/plain), 1.76 KB, created by
Martin Renvoize (ashimema)
on 2014-03-10 16:07:24 UTC
(
hide
)
Description:
[SIGNED OFF] Prevent local authentification fallback if an invalid LDAP password was entered.
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2014-03-10 16:07:24 UTC
Size:
1.76 KB
patch
obsolete
>From 50c7e73382ff20f74f04a9f2ddd2a043976855f8 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9rick?= <frederick.capovilla@libeo.com> >Date: Wed, 19 Feb 2014 11:55:35 -0500 >Subject: [PATCH] [SIGNED OFF] Prevent local authentification fallback if an > invalid LDAP password was entered. > >http://bugs.koha-community.org/show_bug.cgi?id=8148 >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Auth.pm | 1 + > C4/Auth_with_ldap.pm | 6 ++++-- > 2 files changed, 5 insertions(+), 2 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 44edf67..5ad8722 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -1524,6 +1524,7 @@ sub checkpw { > if ($ldap) { > $debug and print STDERR "## checkpw - checking LDAP\n"; > my ($retval,$retcard,$retuserid) = checkpw_ldap(@_); # EXTERNAL AUTH >+ return 0 if $retval == -1; > ($retval) and return ($retval,$retcard,$retuserid); > } > >diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm >index 3b40015..5a838f2 100644 >--- a/C4/Auth_with_ldap.pm >+++ b/C4/Auth_with_ldap.pm >@@ -87,7 +87,9 @@ sub search_method { > base => $base, > filter => $filter, > # attrs => ['*'], >- ) or die "LDAP search failed to return object."; >+ ); >+ die "LDAP search failed to return object : " . $search->error if $search->code; >+ > my $count = $search->count; > if ($search->code > 0) { > warn sprintf("LDAP Auth rejected : %s gets %d hits\n", $filter->as_string, $count) . description($search); >@@ -162,7 +164,7 @@ sub checkpw_ldap { > my $cmpmesg = $db->compare( $userldapentry, attr=>'userpassword', value => $password ); > if ($cmpmesg->code != 6) { > warn "LDAP Auth rejected : invalid password for user '$userid'. " . description($cmpmesg); >- return 0; >+ return -1; > } > } > >-- >1.7.10.4
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 8148
:
25522
|
25523
|
26024
|
26025
|
26147
|
26543
|
29977
|
29978
|
29979
|
30035
|
30036
|
30037
|
30473
|
30524
|
30525
|
30586
|
30587