Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48629
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 30 Jan 2010 23:08:46 +0000 (23:08 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 30 Jan 2010 23:08:46 +0000 (23:08 +0000)
Get nested role search working when {1} is used in roleSearch
Patch provided by Gabriel

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@904914 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/realm/JNDIRealm.java

index 72a0717..0392c56 100644 (file)
@@ -1686,7 +1686,7 @@ public class JNDIRealm extends RealmBase {
                 Set<String> newThisRound = new HashSet<String>(); // Stores the groups we find in this iteration
 
                 for (String groupDN : newGroupDNs) {
-                    filter = roleFormat.format(new String[] { groupDN });
+                    filter = roleFormat.format(new String[] { groupDN, groupDN });
 
                     if (containerLog.isTraceEnabled()) {
                         containerLog.trace("Perform a nested group search with base "+ roleBase + " and filter " + filter);