Merge pull request #14 from chhemme/patch-1

Ignore authentication requests with empty username
This commit is contained in:
Andy Miller
2020-03-23 09:50:45 -06:00
committed by GitHub

View File

@@ -70,6 +70,12 @@ class LoginLDAPPlugin extends Plugin
{
$credentials = $event->getCredentials();
// empty username -> ignore
if($credentials['username'] == ''){
$event->setStatus($event::AUTHENTICATION_FAILURE);
return;
}
// Get Proper username
$user_dn = $this->config->get('plugins.login-ldap.user_dn');
$search_dn = $this->config->get('plugins.login-ldap.search_dn');