[exo-jcr-commits] exo-jcr SVN: r5142 - core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Nov 2 03:19:05 EDT 2011


Author: tolusha
Date: 2011-11-02 03:19:05 -0400 (Wed, 02 Nov 2011)
New Revision: 5142

Modified:
   core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java
Log:
EXOJCR-1597: don't allow authentication with blank password

Modified: core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java
===================================================================
--- core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java	2011-11-02 07:12:52 UTC (rev 5141)
+++ core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java	2011-11-02 07:19:05 UTC (rev 5142)
@@ -179,7 +179,9 @@
       try
       {
          ctx = new InitialLdapContext(props, null);
-         return true;
+
+         // anonymous user could be bind to AD but aren't able to pick up information
+         return (ctx.lookup(userDN) != null);
       }
       catch (NamingException e)
       {



More information about the exo-jcr-commits mailing list