GUACAMOLE-101: Update comments to some of the changes.

This commit is contained in:
Nick Couchman
2017-03-20 22:29:55 -04:00
parent 2aec452aa5
commit c5fe3d1df3
3 changed files with 8 additions and 6 deletions

View File

@@ -295,12 +295,12 @@ public class ConfigurationService {
/**
* Returns the search filter that should be used when querying the
* LDAP server for Guacamole connections. If no filter is specified,
* null is returned.
* the default of objectClass=guacConfigGroup is returned.
*
* @return
* The search filter that should be used when querying the
* LDAP server for connections for Guacamole, or
* null if no filter is specified.
* objectClass=guacConfigGroup if no filter is specified.
*
* @throws GuacamoleException
* If guacamole.properties cannot be parsed.

View File

@@ -165,7 +165,7 @@ public class LDAPGuacamoleProperties {
};
/**
* A search filter to apply to the user LDAP query.
* A search filter to apply to user LDAP queries.
*/
public static final StringGuacamoleProperty LDAP_USER_SEARCH_FILTER = new StringGuacamoleProperty() {
@@ -175,7 +175,7 @@ public class LDAPGuacamoleProperties {
};
/**
* A search filter to apply to the connection LDAP query.
* A search filter to apply to connection LDAP queries.
*/
public static final StringGuacamoleProperty LDAP_CONNECTION_SEARCH_FILTER = new StringGuacamoleProperty() {

View File

@@ -85,10 +85,12 @@ public class UserService {
try {
// Build a filter using the configured or default user search filter
// to find all user objects in the LDAP tree
StringBuilder userSearchFilter = new StringBuilder();
userSearchFilter.append("(&");
userSearchFilter.append(confService.getUserSearchFilter());
userSearchFilter.append("(" + escapeService.escapeLDAPSearchFilter(usernameAttribute) + "=*)");
userSearchFilter.append("(" + escapingService.escapeLDAPSearchFilter(usernameAttribute) + "=*)");
userSearchFilter.append(")");
@@ -195,7 +197,7 @@ public class UserService {
List<String> usernameAttributes = confService.getUsernameAttributes();
// Build LDAP query for users having at least one username attribute
// with the specified username as its value
// and with the configured or default search filter
StringBuilder ldapQuery = new StringBuilder();
ldapQuery.append("(&");
ldapQuery.append(confService.getUserSearchFilter());