diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-01-11 15:17:18 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-01-11 15:17:18 +0100 |
commit | f84ec9256367758b65f37db5f0bc81a9ed2b8d13 (patch) | |
tree | bfbaa8be929cb47d1b16f2de7b5c2ecb467c0603 /apps/user_ldap | |
parent | 9031ae02816d5cf357fce714909ea8ca8d3b8066 (diff) | |
download | nextcloud-server-f84ec9256367758b65f37db5f0bc81a9ed2b8d13.tar.gz nextcloud-server-f84ec9256367758b65f37db5f0bc81a9ed2b8d13.zip |
revert resolving of recursion (3628d4d65d67d12afc93d969de61cb06a33179fd)
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>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/lib/Access.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index d07a8a030a3..b84f5a38b31 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -1914,11 +1914,8 @@ class Access extends LDAPUtility implements IUserTools { // no cookie known from a potential previous search. We need // to start from 0 to come to the desired page. cookie value // of '0' is valid, because 389ds - $reOffset = 0; - while($reOffset < $offset) { - $this->search($filter, array($base), $attr, $limit, $reOffset, true); - $reOffset += $limit; - } + $reOffset = ($offset - $limit) < 0 ? 0 : $offset - $limit; + $this->search($filter, array($base), $attr, $limit, $reOffset, true); $cookie = $this->getPagedResultCookie($base, $filter, $limit, $offset); //still no cookie? obviously, the server does not like us. Let's skip paging efforts. // '0' is valid, because 389ds |