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 906f07f1e3 Partial revert of c817143f and a further correction
906f07f1e3 is described below

commit 906f07f1e32d92d8a1126c0dd63c2af6eec2660b
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]

Reply via email to