LDAP: be careful which limit is send to possible paged LDAP search

This commit is contained in:
Arthur Schiwon 2012-10-27 17:32:55 +02:00
parent 977c4d1844
commit a053da58ce
1 changed files with 4 additions and 1 deletions

View File

@ -112,7 +112,10 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface {
return $ldap_users;
}
//prepare search filter
// if we'd pass -1 to LDAP search, we'd end up in a Protocol error. With a limit of 0, we get 0 results. So we pass null.
if($limit <= 0) {
$limit = null;
}
$search = empty($search) ? '*' : '*'.$search.'*';
$filter = $this->combineFilterWithAnd(array(
$this->connection->ldapUserFilter,