You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2026/09/30 11:36:27 UTC

(tomcat) branch main updated: Follow-up to 87ed9d47

This is an automated email from the ASF dual-hosted git repository.

markt-asf pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new 1c6560001f Follow-up to 87ed9d47
1c6560001f is described below

commit 1c6560001fda17569fbe2e8616d630ef789652b9
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Sep 30 12:36:15 2026 +0100

    Follow-up to 87ed9d47
    
    - always set the callback result
---
 java/org/apache/catalina/authenticator/jaspic/CallbackHandlerImpl.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/authenticator/jaspic/CallbackHandlerImpl.java b/java/org/apache/catalina/authenticator/jaspic/CallbackHandlerImpl.java
index 19983df626..6b4d08c8ed 100644
--- a/java/org/apache/catalina/authenticator/jaspic/CallbackHandlerImpl.java
+++ b/java/org/apache/catalina/authenticator/jaspic/CallbackHandlerImpl.java
@@ -94,12 +94,12 @@ public class CallbackHandlerImpl implements CallbackHandler, Contained {
                         } else {
                             principal = container.getRealm().authenticate(pvc.getUsername(),
                                     String.valueOf(pvc.getPassword()));
-                            pvc.setResult(principal != null);
                             if (principal == null) {
                                 passwordValidationFailed = true;
                             }
                             subject = pvc.getSubject();
                         }
+                        pvc.setResult(!passwordValidationFailed);
                     }
                     default -> log.error(
                             sm.getString("callbackHandlerImpl.jaspicCallbackMissing", callback.getClass().getName()));


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org