This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 01ea27e709 More follow-up to o.a.c.realm code review
01ea27e709 is described below
commit 01ea27e7094497cb7c93b27cef1924d7b96a4f12
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 25c9420361..f9df8b70d3 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]