This is an automated email from the ASF dual-hosted git repository.
rmaucher pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 0d34e56b73 Guard against null manager
0d34e56b73 is described below
commit 0d34e56b73515b6f847a416ce6daa80a4d553aab
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]