diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2012-10-27 17:32:55 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2012-10-27 17:46:01 +0200 |
commit | a053da58ce1c29071654814ce32d083b054ea542 (patch) | |
tree | f0c6daeb4e2f2c3a0b4ca8090c38e98f09631ac5 /apps/user_ldap/user_ldap.php | |
parent | 977c4d184402fee27e262dffa00a7ea32ba5fe2c (diff) | |
download | nextcloud-server-a053da58ce1c29071654814ce32d083b054ea542.tar.gz nextcloud-server-a053da58ce1c29071654814ce32d083b054ea542.zip |
LDAP: be careful which limit is send to possible paged LDAP search
Diffstat (limited to 'apps/user_ldap/user_ldap.php')
-rw-r--r-- | apps/user_ldap/user_ldap.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index 2b789198014..69e470c78a7 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -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, |