forked from lix-project/hydra
LDAP: only try LDAP authentication when the realm is configured
This commit is contained in:
parent
ee60f4ccd9
commit
6a07712e1d
|
@ -29,7 +29,7 @@ sub login_POST {
|
|||
error($c, "You must specify a user name.") if $username eq "";
|
||||
error($c, "You must specify a password.") if $password eq "";
|
||||
|
||||
if ($c->authenticate({username => $username, password => $password}, 'ldap')) {
|
||||
if ($c->get_auth_realm('ldap') && $c->authenticate({username => $username, password => $password}, 'ldap')) {
|
||||
doLDAPLogin($self, $c, $username);
|
||||
} elsif ($c->authenticate({username => $username, password => $password})) {}
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue