You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mi...@apache.org on 2019/12/06 13:29:00 UTC
[tomcat] branch 8.5.x updated: BZ 63982: CombinedRealm makes
assumptions about principal implementation
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push:
new 98fd719 BZ 63982: CombinedRealm makes assumptions about principal implementation
98fd719 is described below
commit 98fd719f1902910ca0f7c7d73223350e32056fe8
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Fri Dec 6 13:49:35 2019 +0100
BZ 63982: CombinedRealm makes assumptions about principal implementation
---
java/org/apache/catalina/realm/CombinedRealm.java | 14 ++++++++++++++
webapps/docs/changelog.xml | 4 ++++
2 files changed, 18 insertions(+)
diff --git a/java/org/apache/catalina/realm/CombinedRealm.java b/java/org/apache/catalina/realm/CombinedRealm.java
index 27f68cc..03665e4 100644
--- a/java/org/apache/catalina/realm/CombinedRealm.java
+++ b/java/org/apache/catalina/realm/CombinedRealm.java
@@ -29,6 +29,7 @@ import org.apache.catalina.Container;
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.Realm;
+import org.apache.catalina.Wrapper;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.ietf.jgss.GSSContext;
@@ -431,6 +432,19 @@ public class CombinedRealm extends RealmBase {
return authenticatedUser;
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean hasRole(Wrapper wrapper, Principal principal, String role) {
+ for (Realm realm : realms) {
+ if (realm.hasRole(wrapper, principal, role)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
@Override
@Deprecated
protected String getName() {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index cef3d73..3a287e1 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -86,6 +86,10 @@
case-sensitive manner as required by the CORS specification. (markt)
</fix>
<fix>
+ <bug>63982</bug>: CombinedRealm makes assumptions about principal implementation
+ (michaelo)
+ </fix>
+ <fix>
<bug>63983</bug>: Correct a regression in the static resource caching
changes introduced in 9.0.28. A large number of file descriptors were
opened that could reach the OS limit before being released by GC.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org