[Koha-bugs] [Bug 10384] Software error when LDAP connexion fails

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Jun 23 08:59:48 CEST 2013


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

Chris Cormack <chris at bigballofwax.co.nz> changed:

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

--- Comment #4 from Chris Cormack <chris at bigballofwax.co.nz> ---
Created attachment 19197
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19197&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 <chris at bigballofwax.co.nz>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list