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 2e875b7e75 Partial revert of c817143f and a further correction
2e875b7e75 is described below
commit 2e875b7e750dd1b67c31fffe4874d34c54e6e036
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Sep 30 12:52:22 2026 +0100
Partial revert of c817143f and a further correction
opencode is hallucinating. The Jakarta Authentication specification is
explicit that isMandatory is stored as a string value.
Additionally, it should only be stored when it is true.
---
java/org/apache/catalina/authenticator/jaspic/MessageInfoImpl.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/catalina/authenticator/jaspic/MessageInfoImpl.java
b/java/org/apache/catalina/authenticator/jaspic/MessageInfoImpl.java
index c2539413a5..472361607a 100644
--- a/java/org/apache/catalina/authenticator/jaspic/MessageInfoImpl.java
+++ b/java/org/apache/catalina/authenticator/jaspic/MessageInfoImpl.java
@@ -59,7 +59,9 @@ public class MessageInfoImpl implements MessageInfo {
public MessageInfoImpl(HttpServletRequest request, HttpServletResponse
response, boolean authMandatory) {
this.request = request;
this.response = response;
- map.put(IS_MANDATORY, Boolean.valueOf(authMandatory));
+ if (authMandatory) {
+ map.put(IS_MANDATORY, Boolean.toString(authMandatory));
+ }
}
@Override
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]