Ignore authentication requests with empty username
When using login-ldap with the admin panel I get an LDAP exception because the query is invalid. It looks like the plugin sends an empty login request when loading the admin login page. This causes an invalid query.
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user