From 4073c20ab3ead74b6134c317d39904626da368a3 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Wed, 12 Mar 2014 10:45:09 +0100 Subject: [PATCH] Bug 8148 - LDAP auth_by_bind doesn't fallback to local auth This patch covers LDAP auth_by_bind configuration so that wrong LDAP password will return -1 to C4::Auth so we can abort local auth and prevent users logging in with stale database passwords. --- C4/Auth_with_ldap.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm index fa688cc..e085120 100644 --- a/C4/Auth_with_ldap.pm +++ b/C4/Auth_with_ldap.pm @@ -145,7 +145,7 @@ sub checkpw_ldap { my $res = $db->bind( $principal_name, password => $password ); if ( $res->code ) { warn "LDAP bind failed as kohauser $userid: " . description($res); - return 0; + return -1; } if ( !defined($userldapentry) && ( $config{update} or $config{replicate} ) ) -- 1.7.2.5