Merge pull request #1665 from owncloud/fix_ldap_1605

LDAP: format dn before using it, not other way round. fixes #1605
This commit is contained in:
Lukas Reschke 2013-02-13 06:59:16 -08:00
commit 4f38b543b0
1 changed files with 1 additions and 1 deletions

View File

@ -57,8 +57,8 @@ abstract class Access {
\OCP\Util::writeLog('user_ldap', 'LDAP resource not available.', \OCP\Util::DEBUG);
return false;
}
$rr = @ldap_read($cr, $dn, $filter, array($attr));
$dn = $this->DNasBaseParameter($dn);
$rr = @ldap_read($cr, $dn, $filter, array($attr));
if(!is_resource($rr)) {
\OCP\Util::writeLog('user_ldap', 'readAttribute failed for DN '.$dn, \OCP\Util::DEBUG);
//in case an error occurs , e.g. object does not exist