This is an automated email from the ASF dual-hosted git repository.
rmaucher 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 a2d9cab129 Fix isAvailable for CombinedRealm
a2d9cab129 is described below
commit a2d9cab129a23b58abd1982a69df32357741cd69
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 41833ca0b9..a50a2972b3 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -234,6 +234,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]