Skip to content

Commit

Permalink
Fixed issue #9034: Authentication with blank password using LDAP
Browse files Browse the repository at this point in the history
Dev: This may or may not be a problem only with ActiveDirectory
Dev: and also depends on the servers settings
  • Loading branch information
mfaber committed May 19, 2014
1 parent a1aebd6 commit f405274
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion application/core/plugins/AuthLDAP/AuthLDAP.php
Expand Up @@ -179,12 +179,20 @@ public function newUserSession()
return;
}

if (empty($password))
{
// If password is null or blank reject login
// This is necessary because in simple bind ldap server authenticates with blank password
$this->setAuthFailure(self::ERROR_PASSWORD_INVALID);
return;
}

// Get configuration settings:
$ldapserver = $this->get('server');
$ldapport = $this->get('ldapport');
$ldapver = $this->get('ldapversion');
$ldaptls = $this->get('ldaptls');
$ldapoptreferrals = $this->get('ldapoptreferrals');
$ldapoptreferrals = $this->get('ldapoptreferrals');
$ldapmode = $this->get('ldapmode');
$suffix = $this->get('domainsuffix');
$prefix = $this->get('userprefix');
Expand Down

0 comments on commit f405274

Please sign in to comment.