Procházet zdrojové kódy

Merge pull request #21108 from nextcloud/fix/20745/eor-old-php-api

fixes infinitely repeating LDPA search results with PHP <= 7.2
tags/v20.0.0beta1
Roeland Jago Douma před 4 roky
rodič
revize
69e2aa029b
Žádný účet není propojen s e-mailovou adresou tvůrce revize
1 změnil soubory, kde provedl 6 přidání a 0 odebrání
  1. 6
    0
      apps/user_ldap/lib/Access.php

+ 6
- 0
apps/user_ldap/lib/Access.php Zobrazit soubor

@@ -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.

Načítá se…
Zrušit
Uložit