GUACAMOLE-957: Match any user for LDAP YAML by default.

This commit is contained in:
Michael Jumper
2021-10-21 16:34:39 -07:00
parent 5a757d0418
commit a216ec902a

View File

@@ -276,6 +276,10 @@ public class JacksonLDAPConfiguration implements LDAPConfiguration {
@Override
public String appliesTo(String username) throws GuacamoleException {
// Match any user by default
if (matchUsernames == null || matchUsernames.isEmpty())
return username;
for (Pattern pattern : matchUsernames) {
Matcher matcher = pattern.matcher(username);
if (matcher.matches())