This is an automated email from the ASF dual-hosted git repository.
rmaucher pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push:
new c7bce7f82b Guard against null manager
c7bce7f82b is described below
commit c7bce7f82b6675aa472872b99676f25c0d83b849
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 86c0897a3d..14130f3689 100644
--- a/java/org/apache/catalina/core/ApplicationHttpRequest.java
+++ b/java/org/apache/catalina/core/ApplicationHttpRequest.java
@@ -547,9 +547,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;
}
@@ -557,7 +561,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]