LDAP: format dn before using it, not other way round. fixes #1605

This commit is contained in:
Arthur Schiwon 2013-02-13 14:49:18 +01:00
parent 5a0a9564ce
commit 1e45453da2
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