Skip to content
Snippets Groups Projects
Commit 4f38b543 authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Merge pull request #1665 from owncloud/fix_ldap_1605

LDAP: format dn before using it, not other way round. fixes #1605
parents 5a0a9564 1e45453d
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment