This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new 5b2abb2733 More follow-up to o.a.c.realm code review
5b2abb2733 is described below
commit 5b2abb2733c6ebcd8f83a5be7f2e4ff8c8f061e4
Author: Mark Thomas <[email protected]>
AuthorDate: Tue Jun 16 15:45:44 2026 +0100
More follow-up to o.a.c.realm code review
Looking at this again, returning null values makes no sense in the
context Tomcat uses the list of values
---
java/org/apache/catalina/realm/JNDIRealm.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/catalina/realm/JNDIRealm.java
b/java/org/apache/catalina/realm/JNDIRealm.java
index 42bd3388aa..846593e8b7 100644
--- a/java/org/apache/catalina/realm/JNDIRealm.java
+++ b/java/org/apache/catalina/realm/JNDIRealm.java
@@ -2325,7 +2325,8 @@ public class JNDIRealm extends RealmBase {
Object value = e.next();
String valueString;
if (value == null) {
- valueString = null;
+ // Where this is used (roles) it makes to sense to pass on
null values
+ continue;
} else if (value instanceof byte[]) {
valueString = new String((byte[]) value,
StandardCharsets.UTF_8);
} else {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]