This is an automated email from the ASF dual-hosted git repository.
markt-asf 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 92376d45e8 Fix running under a SecurityManager
92376d45e8 is described below
commit 92376d45e83720dd497dabc6b015d87e8ccbb9ff
Author: Mark Thomas <[email protected]>
AuthorDate: Thu May 21 12:48:36 2026 +0100
Fix running under a SecurityManager
---
java/org/apache/catalina/security/SecurityClassLoad.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/catalina/security/SecurityClassLoad.java
b/java/org/apache/catalina/security/SecurityClassLoad.java
index 01bcced659..ac15fb5384 100644
--- a/java/org/apache/catalina/security/SecurityClassLoad.java
+++ b/java/org/apache/catalina/security/SecurityClassLoad.java
@@ -112,7 +112,7 @@ public final class SecurityClassLoad {
loader.loadClass(basePackage + "http11.Constants");
// Make sure system property is read at this point
Class<?> clazz = loader.loadClass(basePackage + "Constants");
- clazz.getConstructor().newInstance();
+ clazz.getField("IS_SECURITY_ENABLED").get(null);
loader.loadClass(basePackage + "http2.Stream$PrivilegedPush");
}
@@ -176,7 +176,7 @@ public final class SecurityClassLoad {
loader.loadClass(basePackage + "util.http.NamesEnumerator");
// Make sure system property is read at this point
Class<?> clazz = loader.loadClass(basePackage +
"util.http.FastHttpDateFormat");
- clazz.getConstructor().newInstance();
+ clazz.getMethod("getCurrentDate").invoke(null, (Object[]) null);
loader.loadClass(basePackage + "util.http.parser.HttpParser");
loader.loadClass(basePackage + "util.http.parser.MediaType");
loader.loadClass(basePackage + "util.http.parser.MediaTypeCache");
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]