From ef9739f0ebec20198a3c80966e0b5f76454ec482 Mon Sep 17 00:00:00 2001 From: Simey Lameze Date: Tue, 2 Dec 2014 09:41:46 +0800 Subject: [PATCH] MDL-48255 auth_ldap: make ldap cookie check more robust Thanks to Baptiste Desprez for spotting this and provide a solution. --- auth/ldap/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth/ldap/auth.php b/auth/ldap/auth.php index f80ab19c17d..d4d341b63ad 100644 --- a/auth/ldap/auth.php +++ b/auth/ldap/auth.php @@ -739,7 +739,7 @@ class auth_plugin_ldap extends auth_plugin_base { } while ($entry = ldap_next_entry($ldapconnection, $entry)); } unset($ldap_result); // Free mem. - } while ($ldap_pagedresults && !empty($ldap_cookie)); + } while ($ldap_pagedresults && $ldap_cookie !== null && $ldap_cookie != ''); } // If LDAP paged results were used, the current connection must be completely