From 0b8375fd2ac9fa92a1057a00cbc7033f739dc523 Mon Sep 17 00:00:00 2001 From: gulikoza Date: Sun, 24 Jan 2016 11:37:43 +0100 Subject: [PATCH] Add additional check that full dn has been entered on login. Fixes 'invalid dn syntax (34) for user' error when fallback_dn set and username was not found while trying to use it as dn. --- lib/ds_ldap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ds_ldap.php b/lib/ds_ldap.php index 8bc1ef8..554f9de 100644 --- a/lib/ds_ldap.php +++ b/lib/ds_ldap.php @@ -251,7 +251,7 @@ class ldap extends DS { else $userDN = $this->getLoginID($user,'login'); - if (! $userDN && $this->getValue('login','fallback_dn')) + if (! $userDN && $this->getValue('login','fallback_dn') && strpos($user, '=')) $userDN = $user; if (! $userDN)