From 89db2963ce5c21f0712ceb35db670b29eb8c63de Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Mon, 27 Jul 2015 18:17:57 +0200 Subject: [PATCH] (legacy) fix ldap binddn and password for proper anon usage --- src/etc/inc/auth.inc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/etc/inc/auth.inc b/src/etc/inc/auth.inc index ab2ea9bf2..3f09aef48 100644 --- a/src/etc/inc/auth.inc +++ b/src/etc/inc/auth.inc @@ -1228,6 +1228,14 @@ function auth_get_authserver($name) { if (!empty($authcfg['ldap_port'])) { $authcfg['ldap_full_url'] .= ":{$authcfg['ldap_port']}"; } + // make sure a user and password entry exists and are null for anonymous usage + if (empty($authcfg['ldap_binddn'])) { + $authcfg['ldap_binddn'] = null; + } + if (empty($authcfg['ldap_bindpw'])) { + $authcfg['ldap_bindpw'] = null; + } + } return $authcfg; }