From a085d7715f7fda43f322eb36143b268add3f2061 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Thu, 20 Mar 2014 22:59:41 +0100 Subject: fix potential infinite loop when the DN of the first entry was already read. --- apps/user_ldap/lib/wizard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/user_ldap/lib') diff --git a/apps/user_ldap/lib/wizard.php b/apps/user_ldap/lib/wizard.php index f97ab51f0f0..f6bc586a7a6 100644 --- a/apps/user_ldap/lib/wizard.php +++ b/apps/user_ldap/lib/wizard.php @@ -910,6 +910,7 @@ class Wizard extends LDAPUtility { $dnReadCount = 0; do { $entry = $this->ldap->$getEntryFunc($cr, $rr); + $getEntryFunc = 'nextEntry'; if(!$this->ldap->isResource($entry)) { continue 2; } @@ -926,7 +927,6 @@ class Wizard extends LDAPUtility { $foundItems = array_merge($foundItems, $newItems); $this->resultCache[$dn][$attr] = $newItems; $dnRead[] = $dn; - $getEntryFunc = 'nextEntry'; $rr = $entry; //will be expected by nextEntry next round } while(($state === self::LRESULT_PROCESSED_SKIP || $this->ldap->isResource($entry)) -- cgit v1.2.3