GUACAMOLE-234: Correctly handle bind failure.
This commit is contained in:
1 parent
791cfeabbb
commit
742b0c4e65
1 file changed
+4
-1
+4
-1
@@ -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