https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28587 Bug ID: 28587 Summary: ldap auth fails unless <ldapserver id="ldapserver"> Change sponsored?: --- Product: Koha Version: 21.05 Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Authentication Assignee: koha-bugs@lists.koha-community.org Reporter: marceau@unh.edu QA Contact: testopia@bugs.koha-community.org CC: dpavlin@rot13.org This is related/similar to bug 28385. Apologies if this should be posted there instead. The fix there only works if ldapserver id is set to "ldapserver" and not anything else (such as <ldapserver id="ad.domain.com">). In previous versions ldapserver id could be set to anything. There is nothing in the release notes noting this behavior change so it seems to be a bug. To reproduce simply set ldapserver id to something else and restart plack. There should be lots of errors in the plack-error.log, most useful is: No ldapserver "hostname" defined in KOHA_CONF: /etc/koha/sites/instance/koha-conf.xml The problem is in Auth_with_ldap.pm, specifically: if ( exists $ldap->{ldapserver} ) { $ldap = $ldap->{ldapserver} or die ldapserver_error('id="ldapserver"'); } The code is assuming the id is "ldapserver". Better behavior would be to evaluate $ldap and find what the id is set to. It should be the only key in $ldap, and then do: $ldap=$ldap->{$ldapserveridname} The easy fix is just to set the id to ldapserver, but again, that isn't documented anywhere. I can probably provide a patch in in the next few days. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.