http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10384

Kyle M Hall <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #19197|0                           |1
        is obsolete|                            |

--- Comment #5 from Kyle M Hall <[email protected]> ---
Created attachment 19403
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19403&action=edit
Bug 10384 - Software error when LDAP connexion fails

When using LDAP authentication, the authentication falls back to normal
authentication if user does not exist in LDAP.

Actually, if the LDAP server is down, you get a software error (even with mysql
user) :
Can't call method "bind" on an undefined value at C4/Auth_with_ldap.pm line
134, <DATA> line 558.

This patch catches this error to allow normal authentication when LDAP
connexion fails.

Test plan :
- Configure LDAP connexion with a host not having LDAP. ie :
 <useldapserver>1</useldapserver>
 <ldapserver id="ldapserver">
    <hostname>localhost</hostname>
    <base>dc=test,dc=com</base>
    <user>cn=Manager,dc=test,dc=com</user>
    <pass>passwd</pass>
    <replicate>0</replicate>
    <update>0</update>
    <auth_by_bind>0</auth_by_bind>
    <mapping>
      <firstname    is="givenname"      ></firstname>
      <surname      is="sn"             ></surname>
      <branchcode   is="branch"         >MAIN</branchcode>
      <userid       is="uid"            ></userid>
      <password     is="userpassword"   ></password>
      <email        is="mail"           ></email>
      <categorycode is="employeetype"   >PT</categorycode>
    </mapping>
 </ldapserver>
- Try to connect with mysql user (defined in koha-conf.xml)
- Try to connect with a user defined in borrowers
You may try to connect with working LDAP connexion

Signed-off-by: Chris Cormack <[email protected]>
Signed-off-by: Kyle M Hall <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to