mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-234: Correctly handle bind failure.
This commit is contained in:
committed by
Virtually Nick
parent
791cfeabbb
commit
742b0c4e65
@@ -150,6 +150,8 @@ public class LDAPConnectionService {
|
||||
bindRequest.setDn(userDN);
|
||||
bindRequest.setCredentials(password);
|
||||
ldapConnection.bind(bindRequest);
|
||||
if (ldapConnection.isConnected() && ldapConnection.isAuthenticated())
|
||||
return ldapConnection;
|
||||
|
||||
}
|
||||
|
||||
@@ -162,7 +164,8 @@ public class LDAPConnectionService {
|
||||
CredentialsInfo.USERNAME_PASSWORD);
|
||||
}
|
||||
|
||||
return ldapConnection;
|
||||
throw new GuacamoleInvalidCredentialsException("Authentication failed.",
|
||||
CredentialsInfo.USERNAME_PASSWORD);
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user