Fix that Icinga\Protocol\Ldap\Connection does not correctly apply limits
This commit is contained in:
parent
97cc37b99c
commit
9ff0bbcfc0
|
@ -285,8 +285,9 @@ class Connection
|
|||
$entry = ldap_first_entry($this->ds, $results);
|
||||
while ($entry) {
|
||||
$count++;
|
||||
if (($offset === null || $offset <= $count)
|
||||
&& ($limit === null || ($offset + $limit) > $count)
|
||||
if (
|
||||
($offset === null || $offset <= $count)
|
||||
&& ($limit === null || $limit > count($entries))
|
||||
) {
|
||||
$entries[ldap_get_dn($this->ds, $entry)] = $this->cleanupAttributes(
|
||||
ldap_get_attributes($this->ds, $entry)
|
||||
|
|
Loading…
Reference in New Issue