Skip to content

Commit f84ec92

Browse files
committed
revert resolving of recursion (3628d4d)
without recursion we have issues with internal states. paged search status are set to false, cookies are not being set. In the end we have endless requests which pile up enormously with a high initial offset. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
1 parent 9031ae0 commit f84ec92

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

apps/user_ldap/lib/Access.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1914,11 +1914,8 @@ private function initPagedSearch($filter, $bases, $attr, $limit, $offset) {
19141914
// no cookie known from a potential previous search. We need
19151915
// to start from 0 to come to the desired page. cookie value
19161916
// of '0' is valid, because 389ds
1917-
$reOffset = 0;
1918-
while($reOffset < $offset) {
1919-
$this->search($filter, array($base), $attr, $limit, $reOffset, true);
1920-
$reOffset += $limit;
1921-
}
1917+
$reOffset = ($offset - $limit) < 0 ? 0 : $offset - $limit;
1918+
$this->search($filter, array($base), $attr, $limit, $reOffset, true);
19221919
$cookie = $this->getPagedResultCookie($base, $filter, $limit, $offset);
19231920
//still no cookie? obviously, the server does not like us. Let's skip paging efforts.
19241921
// '0' is valid, because 389ds

0 commit comments

Comments
 (0)