Skip to content
Snippets Groups Projects
Commit 7e614838 authored by Aleksander Machniak's avatar Aleksander Machniak
Browse files

Make sure ldap filter is not empty when searching, use (objectclass=*) by default

ldap_search() throws errors on empty filter as find out in
http://trac.roundcube.net/ticket/1490269. As this was a configuration
issue we can simply prevent that and provide real and working default.
parent a5953c2a
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -1552,12 +1552,16 @@ class Net_LDAP3
return false;
}
 
$this->_debug("C: Search base dn: [$base_dn] scope [$scope] with filter [$filter]");
// make sure attributes list is not empty
if (empty($attrs)) {
$attrs = array('dn');
}
// make sure filter is not empty
if (empty($filter)) {
$filter = '(objectclass=*)';
}
$this->_debug("C: Search base dn: [$base_dn] scope [$scope] with filter [$filter]");
 
$function = self::scope_to_function($scope, $ns_function);
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment