diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2014-05-16 18:03:15 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2014-08-28 11:52:33 +0200 |
commit | dbd51d15e1558fac4936a593ea3599b344d83b07 (patch) | |
tree | 402c7e1eeec56f9173063a5979da88e8f62d9d79 /apps/user_ldap/lib | |
parent | 2f76117cb804e7e18d2d3bc8b072e18a7c09f43c (diff) | |
download | nextcloud-server-dbd51d15e1558fac4936a593ea3599b344d83b07.tar.gz nextcloud-server-dbd51d15e1558fac4936a593ea3599b344d83b07.zip |
Port of #8623
set result entry identifier earlier, i.e. before a continue for the same level can happen. otherwise will always get the same value and we end up in an infinite loop
add unit test to make sure the infinite loop never comes back
Conflicts:
apps/user_ldap/tests/wizard.php
Diffstat (limited to 'apps/user_ldap/lib')
-rw-r--r-- | apps/user_ldap/lib/wizard.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/wizard.php b/apps/user_ldap/lib/wizard.php index eb2a1ab02de..0cec493d9ed 100644 --- a/apps/user_ldap/lib/wizard.php +++ b/apps/user_ldap/lib/wizard.php @@ -994,6 +994,7 @@ class Wizard extends LDAPUtility { if(!$this->ldap->isResource($entry)) { continue 2; } + $rr = $entry; //will be expected by nextEntry next round $attributes = $this->ldap->getAttributes($cr, $entry); $dn = $this->ldap->getDN($cr, $entry); if($dn === false || in_array($dn, $dnRead)) { @@ -1007,7 +1008,6 @@ class Wizard extends LDAPUtility { $foundItems = array_merge($foundItems, $newItems); $this->resultCache[$dn][$attr] = $newItems; $dnRead[] = $dn; - $rr = $entry; //will be expected by nextEntry next round } while(($state === self::LRESULT_PROCESSED_SKIP || $this->ldap->isResource($entry)) && ($dnReadLimit === 0 || $dnReadCount < $dnReadLimit)); |