Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-05-26 12:54:20 +0300
committerGitHub <noreply@github.com>2020-05-26 12:54:20 +0300
commit69e2aa029b70539ce7739114a978797c170e4d5c (patch)
treecd462775d738f37bf84f96466bc483290ac138cd
parentfda71a99794da0abfe119cc6e45dff7f02e2e25e (diff)
parent15008a17984c99cbf94d13b39e8f501bbe6b5698 (diff)
Merge pull request #21108 from nextcloud/fix/20745/eor-old-php-api
fixes infinitely repeating LDPA search results with PHP <= 7.2
-rw-r--r--apps/user_ldap/lib/Access.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php
index 16013555d4e..d58106707ef 100644
--- a/apps/user_ldap/lib/Access.php
+++ b/apps/user_ldap/lib/Access.php
@@ -2049,6 +2049,12 @@ class Access extends LDAPUtility {
// of '0' is valid, because 389ds
$reOffset = ($offset - $limit) < 0 ? 0 : $offset - $limit;
$this->search($filter, $base, $attr, $limit, $reOffset, true);
+ if (!$this->hasMoreResults()) {
+ // when the cookie is reset with != 0 offset, there are no further
+ // results, so stop. This if block is not necessary with new API
+ // and can be removed with dropping PHP 7.2
+ return false;
+ }
}
if ($this->lastCookie !== '' && $offset === 0) {
//since offset = 0, this is a new search. We abandon other searches that might be ongoing.