diff --git a/plugins/scm-auth-ldap-plugin/src/main/java/sonia/scm/auth/ldap/LDAPAuthenticationHandler.java b/plugins/scm-auth-ldap-plugin/src/main/java/sonia/scm/auth/ldap/LDAPAuthenticationHandler.java index d4823f4e7b..f958eea365 100644 --- a/plugins/scm-auth-ldap-plugin/src/main/java/sonia/scm/auth/ldap/LDAPAuthenticationHandler.java +++ b/plugins/scm-auth-ldap-plugin/src/main/java/sonia/scm/auth/ldap/LDAPAuthenticationHandler.java @@ -57,8 +57,8 @@ import java.io.IOException; import java.text.MessageFormat; import java.util.HashSet; +import java.util.Hashtable; import java.util.Properties; -import java.util.Set; import javax.naming.Context; import javax.naming.NamingEnumeration; @@ -153,7 +153,8 @@ public class LDAPAuthenticationHandler implements AuthenticationHandler { SearchResult sr = searchResult.next(); String userDn = sr.getName() + "," + baseDn; - Properties userProperties = new Properties(ldapProperties); + Hashtable userProperties = new Hashtable(ldapProperties); userProperties.put(Context.SECURITY_PRINCIPAL, userDn); userProperties.put(Context.SECURITY_CREDENTIALS, password); @@ -213,7 +214,6 @@ public class LDAPAuthenticationHandler implements AuthenticationHandler // read dynamic group attribute getGroups(userAttributes, groups); - result = new AuthenticationResult(user, groups); } catch (NamingException ex) @@ -350,7 +350,7 @@ public class LDAPAuthenticationHandler implements AuthenticationHandler */ private void buildLdapProperties() { - ldapProperties = new Properties(); + ldapProperties = new Hashtable(); ldapProperties.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); ldapProperties.put(Context.PROVIDER_URL, config.getHostUrl()); @@ -411,7 +411,7 @@ public class LDAPAuthenticationHandler implements AuthenticationHandler private LDAPConfig config; /** Field description */ - private Properties ldapProperties; + private Hashtable ldapProperties; /** Field description */ private Store store;