This is an automated email from the ASF dual-hosted git repository.
rmaucher 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 e9f1449901 Guard against null manager
e9f1449901 is described below
commit e9f144990160bb467f0ecc21dbef4f6ca354d779
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 c5db8b4dc7..d988a14a22 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]