From 53e96ae4e1510c13dd14612f028f91ef3e2b1eca 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 b77c305fcea..4c5f736a563 100644 --- a/auth/ldap/auth.php +++ b/auth/ldap/auth.php @@ -742,7 +742,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