This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push: new 30d2d07 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63213 30d2d07 is described below commit 30d2d07c4e51c7d52dd8958ecdcdf539a3eb32b3 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 7bc59e9..cb22241 100644 --- a/java/org/apache/catalina/realm/JNDIRealm.java +++ b/java/org/apache/catalina/realm/JNDIRealm.java @@ -2029,7 +2029,8 @@ public class JNDIRealm extends RealmBase { Map<String, String> newThisRound = new HashMap<>(); // 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 6269449..bdc69cf 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -102,6 +102,11 @@ This ensures that a non-daemon thread is not left running that will prevent Tomcat from shutting down cleanly. (markt) </fix> + <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