mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUAC-1115: Proceed even if an error prevents retrieval of all users in the directory (mitigates GUAC-1353).
This commit is contained in:
@@ -143,8 +143,21 @@ public class UserService {
|
|||||||
|
|
||||||
// Build map of users by querying each username attribute separately
|
// Build map of users by querying each username attribute separately
|
||||||
Map<String, User> users = new HashMap<String, User>();
|
Map<String, User> users = new HashMap<String, User>();
|
||||||
for (String usernameAttribute : confService.getUsernameAttributes())
|
for (String usernameAttribute : confService.getUsernameAttributes()) {
|
||||||
putAllUsers(users, ldapConnection, usernameAttribute);
|
|
||||||
|
// Attempt to pull all users with given attribute
|
||||||
|
try {
|
||||||
|
putAllUsers(users, ldapConnection, usernameAttribute);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Log any errors non-fatally
|
||||||
|
catch (GuacamoleException e) {
|
||||||
|
logger.warn("Could not query list of all users for attribute \"{}\": {}",
|
||||||
|
usernameAttribute, e.getMessage());
|
||||||
|
logger.debug("Error querying list of all users.", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// Return map of all users
|
// Return map of all users
|
||||||
return users;
|
return users;
|
||||||
|
Reference in New Issue
Block a user