This is an automated email from the ASF dual-hosted git repository.
rmaucher 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 9744637e25 Guard against null manager
9744637e25 is described below
commit 9744637e253167ffa9982967f415799b19a98c71
Author: remm <[email protected]>
AuthorDate: Thu May 21 10:49:56 2026 +0200
Guard against null manager
---
java/org/apache/catalina/core/ApplicationHttpRequest.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/catalina/core/ApplicationHttpRequest.java
b/java/org/apache/catalina/core/ApplicationHttpRequest.java
index f1ee4191ba..ec306c7287 100644
--- a/java/org/apache/catalina/core/ApplicationHttpRequest.java
+++ b/java/org/apache/catalina/core/ApplicationHttpRequest.java
@@ -541,9 +541,13 @@ class ApplicationHttpRequest extends
HttpServletRequestWrapper {
other = super.getSession(true);
}
if (other != null) {
+ Manager manager = context.getManager();
+ if (manager == null) {
+ return null;
+ }
Session localSession = null;
try {
- localSession =
context.getManager().findSession(other.getId());
+ localSession = manager.findSession(other.getId());
if (localSession != null && !localSession.isValid()) {
localSession = null;
}
@@ -551,7 +555,7 @@ class ApplicationHttpRequest extends
HttpServletRequestWrapper {
// Ignore
}
if (localSession == null && create) {
- localSession =
context.getManager().createSession(other.getId());
+ localSession = manager.createSession(other.getId());
}
if (localSession != null) {
localSession.access();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]