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

markt 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 11b80d9e53 Fix backport - 10.1.x and earlier support a SecurityManager
11b80d9e53 is described below

commit 11b80d9e5347bfc8dcd869c48a8f5a02c7cf0b38
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Sun Mar 26 20:55:23 2023 +0100

    Fix backport - 10.1.x and earlier support a SecurityManager
---
 java/org/apache/catalina/connector/Request.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index 986b782791..879651f58b 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -2437,7 +2437,7 @@ public class Request implements HttpServletRequest {
          * As per PR #594, the manager could be provided by the web 
application and calls to findSession() could trigger
          * class loading so set the thread context class loader appropriately 
to avoid ClassNotFoundException.
          */
-        ClassLoader originalClassLoader = context.bind(null);
+        ClassLoader originalClassLoader = 
context.bind(Globals.IS_SECURITY_ENABLED, null);
         try {
             Manager manager = context.getManager();
             if (manager == null) {
@@ -2472,7 +2472,7 @@ public class Request implements HttpServletRequest {
 
             return true;
         } finally {
-            context.unbind(originalClassLoader);
+            context.unbind(Globals.IS_SECURITY_ENABLED, originalClassLoader);
         }
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to