Author: li.liang
Date: 2009-04-07 13:15:19 -0400 (Tue, 07 Apr 2009)
New Revision: 726
Modified:
trunk/server/src/main/java/com/metamatrix/platform/security/membership/spi/ldap/LDAPMembershipDomain.java
Log:
JIRA TEIID 471 - Map user name with blank password to blank user name.
Modified:
trunk/server/src/main/java/com/metamatrix/platform/security/membership/spi/ldap/LDAPMembershipDomain.java
===================================================================
---
trunk/server/src/main/java/com/metamatrix/platform/security/membership/spi/ldap/LDAPMembershipDomain.java 2009-04-07
14:29:16 UTC (rev 725)
+++
trunk/server/src/main/java/com/metamatrix/platform/security/membership/spi/ldap/LDAPMembershipDomain.java 2009-04-07
17:15:19 UTC (rev 726)
@@ -24,6 +24,7 @@
import java.io.Serializable;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Hashtable;
@@ -318,6 +319,10 @@
}
}
}
+
+ if(credential.getCredentialsAsCharArray().length == 0){
+ username = "";//$NON-NLS-1$
+ }
return new SuccessfulAuthenticationToken(trustedPayload, username);
}
@@ -357,6 +362,10 @@
LogManager.logTrace(LogSecurityConstants.CTX_MEMBERSHIP, new Object[]
{domainName, "getGroupNamesForUser", username}); //$NON-NLS-1$
+ if(username.length() == 0){
+ return Collections.EMPTY_SET;
+ }
+
UserEntry ue = getUserEntry(username, true);
return ue.getGroups();
Show replies by date