Bugzilla – Attachment 121263 Details for
Bug 28385
LDAP server configuration broken since migration from XML::Simple
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28385: ldap server configuration broken since migration from XML::Simple
Bug-28385-ldap-server-configuration-broken-since-m.patch (text/plain), 1.99 KB, created by
Victor Grousset/tuxayo
on 2021-05-20 22:14:33 UTC
(
hide
)
Description:
Bug 28385: ldap server configuration broken since migration from XML::Simple
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2021-05-20 22:14:33 UTC
Size:
1.99 KB
patch
obsolete
>From 45ea8950175e554e9177aa74ebf2f5c702fedef3 Mon Sep 17 00:00:00 2001 >From: Dobrica Pavlinusic <dpavlin@rot13.org> >Date: Wed, 19 May 2021 12:24:53 +0200 >Subject: [PATCH] Bug 28385: ldap server configuration broken since migration > from XML::Simple > >Bug 28278 removed usage of XML::Simple which had side-affect that >C4::Context->config("ldapserver") returns one more level of hash >based on id of element, so ldap configuration was no longer >available generating error in log: > >No ldapserver "hostname" defined in KOHA_CONF: /etc/koha/sites/srvgit/koha-conf.xml > >which is very confusing since hostname is there, but we are looking >at wrong place for it. > >== Test plan == >1. Setup an LDAP server with users or use a public one > See https://wiki.koha-community.org/wiki/Ldap_testing >2. Configure Koha to use it, see example config above >3. Go to OPAC >4. Koha doesn't compile due to LDAP config not parsed correctly >5. Apply the patch >6. Koha compiles and page loads >7. Log in successfully with one of the LDAP users >8. Bonus: Try to log-in with a wrong username & a good password and > vice-versa > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > C4/Auth_with_ldap.pm | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm >index 679c045141..face1e428f 100644 >--- a/C4/Auth_with_ldap.pm >+++ b/C4/Auth_with_ldap.pm >@@ -51,6 +51,8 @@ sub ldapserver_error { > > use vars qw($mapping @ldaphosts $base $ldapname $ldappassword); > my $ldap = C4::Context->config("ldapserver") or die 'No "ldapserver" in server hash from KOHA_CONF: ' . $ENV{KOHA_CONF}; >+# since Bug 28278 we need to skip id in <ldapserver id="ldapserver"> which generates additional hash level >+$ldap = $ldap->{ldapserver} or die ldapserver_error('id="ldapserver"'); > my $prefhost = $ldap->{hostname} or die ldapserver_error('hostname'); > my $base = $ldap->{base} or die ldapserver_error('base'); > $ldapname = $ldap->{user} ; >-- >2.31.1
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 28385
:
121147
|
121148
|
121244
| 121263 |
121265
|
121279
|
121361