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

rmaucher 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 f84b6ce6b8 Fix isAvailable for CombinedRealm
f84b6ce6b8 is described below

commit f84b6ce6b849088edb85fc6854295fef751085be
Author: remm <[email protected]>
AuthorDate: Tue Jun 2 12:27:57 2026 +0200

    Fix isAvailable for CombinedRealm
---
 java/org/apache/catalina/realm/CombinedRealm.java | 6 +++---
 webapps/docs/changelog.xml                        | 4 ++++
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/realm/CombinedRealm.java 
b/java/org/apache/catalina/realm/CombinedRealm.java
index 7b54ce7e56..d4d8ba86d2 100644
--- a/java/org/apache/catalina/realm/CombinedRealm.java
+++ b/java/org/apache/catalina/realm/CombinedRealm.java
@@ -387,11 +387,11 @@ public class CombinedRealm extends RealmBase {
     @Override
     public boolean isAvailable() {
         for (Realm realm : realms) {
-            if (!realm.isAvailable()) {
-                return false;
+            if (realm.isAvailable()) {
+                return true;
             }
         }
-        return true;
+        return false;
     }
 
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 3ce55a7ccc..24b0d724a5 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -330,6 +330,10 @@
       <fix>
         Fix SSO cookie partitioned configuration. (remm)
       </fix>
+      <fix>
+        Fix <code>CombinedRealm</code> <code>isAvailable</code>, it allows
+        authentication if at least one sub realm is available. (remm)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to