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

markt-asf pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
     new 5e34668072 Fix running under a SecurityManager
5e34668072 is described below

commit 5e3466807233af0aae38b71f24f5564a1ec8967b
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 942559168f..02ca9a2cfc 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]

Reply via email to