This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push:
new d9de433b49 More follow-up to o.a.c.realm code review
d9de433b49 is described below
commit d9de433b4900153ab0ca83a19c84f1b8e8706ebf
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 06ba343d1e..f4c68eb4c9 100644
--- a/java/org/apache/catalina/realm/JNDIRealm.java
+++ b/java/org/apache/catalina/realm/JNDIRealm.java
@@ -2327,7 +2327,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]