This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 7.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/7.0.x by this push: new 2e606a4 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63213 2e606a4 is described below commit 2e606a4824fdd626b28891c3d27dc63e5fdbcb19 Author: Mark Thomas <ma...@apache.org> AuthorDate: Tue Mar 5 19:19:32 2019 +0000 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63213 Ensure the correct escaping of group names when searching for nested groups when the JNDIRealm is configured with roleNested set to true. --- java/org/apache/catalina/realm/JNDIRealm.java | 3 ++- webapps/docs/changelog.xml | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/java/org/apache/catalina/realm/JNDIRealm.java b/java/org/apache/catalina/realm/JNDIRealm.java index 49392eb..ddd07ae 100644 --- a/java/org/apache/catalina/realm/JNDIRealm.java +++ b/java/org/apache/catalina/realm/JNDIRealm.java @@ -2076,7 +2076,8 @@ public class JNDIRealm extends RealmBase { Map<String, String> newThisRound = new HashMap<String, String>(); // Stores the groups we find in this iteration for (Entry<String, String> group : newGroups.entrySet()) { - filter = roleFormat.format(new String[] { group.getKey(), group.getValue(), group.getValue() }); + filter = roleFormat.format(new String[] { doRFC2254Encoding(group.getKey()), + group.getValue(), group.getValue() }); if (containerLog.isTraceEnabled()) { containerLog.trace("Perform a nested group search with base "+ roleBase + " and filter " + filter); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 50b06f5..438bc5e 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -68,6 +68,11 @@ location specified by the Servlet does not already exist. The deafult value is <code>false</code>. (markt) </add> + <fix> + <bug>63213</bug>: Ensure the correct escaping of group names when + searching for nested groups when the JNDIRealm is configured with + <code>roleNested</code> set to <code>true</code>. (markt) + </fix> </changelog> </subsection> <subsection name="Coyote"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org