Bugzilla – Attachment 20821 Details for
Bug 7973
Allow for new type of LDAP authentication
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7973: Fixed bug in Auth_with_ldap - Counter patch
0001-Bug-7973-Fixed-bug-in-Auth_with_ldap.patch (text/plain), 1.64 KB, created by
Martin Renvoize (ashimema)
on 2013-09-06 10:26:04 UTC
(
hide
)
Description:
Bug 7973: Fixed bug in Auth_with_ldap - Counter patch
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2013-09-06 10:26:04 UTC
Size:
1.64 KB
patch
obsolete
>From 70835675b80d8d512784e051f96d4b9a34e84bc8 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 6 Sep 2013 10:41:39 +0100 >Subject: [PATCH] Bug 7973: Fixed bug in Auth_with_ldap > >A bug in Auth_with_ldap was preventing ldapuser binds from >taking priority over anonymous binds when auth_by_bind was >set and an ldapuser and ldappassowrd were also set. >--- > C4/Auth_with_ldap.pm | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm >index 6143c9f..5e7a7d7 100644 >--- a/C4/Auth_with_ldap.pm >+++ b/C4/Auth_with_ldap.pm >@@ -112,10 +112,10 @@ sub checkpw_ldap { > my $userldapentry; > > if ( $ldap->{auth_by_bind} ) { >- # Perform an anonymous bind >- my $res = $db->bind; >+ # Perform initial bind (anonymous or otherwise) >+ my $res = ($config{anonymous}) ? $db->bind : $db->bind($ldapname, password=>$ldappassword); > if ( $res->code ) { >- $debug and warn "Anonymous LDAP bind failed: ". description($res); >+ $debug and warn "LDAP bind failed as ldapuser " . ($ldapname || '[ANONYMOUS]') . ": " . description($res); > return 0; > } > >@@ -123,7 +123,7 @@ sub checkpw_ldap { > my $search = search_method($db, $userid) or return 0; # warnings are in the sub > $userldapentry = $search->shift_entry; > >- # Perform a LDAP bind for the given username using the matched DN >+ # Perform a LDAP (re)bind for the given username using the matched DN > $res = $db->bind( $userldapentry->dn, password => $password ); > if ( $res->code ) { > $debug and warn "LDAP bind failed as kohauser $userid: ". description($res); >-- >1.8.1.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 7973
:
9233
|
12950
|
12955
|
14775
|
16580
|
16686
|
16703
|
16704
| 20821