This is an automated email from the ASF dual-hosted git repository.
rmaucher pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 013f5792e8 Fix isAvailable for CombinedRealm
013f5792e8 is described below
commit 013f5792e86e714d9c6f55fbf1f56ea01e07e6df
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 6868b6372f..fa94536bfe 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -223,6 +223,10 @@
When encoding URLs with the <code>CsrfPreventionFilter</code>, don't
add
the nonce to URLs that are known not to require it. (markt)
</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]