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:
commit
4f38b543b0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue