LDAP: fix possible recursion

This commit is contained in:
Arthur Schiwon 2013-05-25 11:03:58 +02:00
parent bfa715768a
commit 86d72b9a61
1 changed files with 7 additions and 0 deletions

View File

@ -635,10 +635,17 @@ class Connection {
* Binds to LDAP
*/
public function bind() {
static $getConnectionResourceAttempt = false;
if(!$this->config['ldapConfigurationActive']) {
return false;
}
if($getConnectionResourceAttempt) {
$getConnectionResourceAttempt = false;
return false;
}
$getConnectionResourceAttempt = true;
$cr = $this->getConnectionResource();
$getConnectionResourceAttempt = false;
if(!is_resource($cr)) {
return false;
}