You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2020/12/08 15:28:02 UTC
[tomcat] branch master updated: 64965: Avoid JspContextWrapper ISE
in findAttribute
This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push:
new 73adbe7 64965: Avoid JspContextWrapper ISE in findAttribute
73adbe7 is described below
commit 73adbe757c209343cc9507c5c7d98c7aa78b9d75
Author: remm <re...@apache.org>
AuthorDate: Tue Dec 8 16:24:39 2020 +0100
64965: Avoid JspContextWrapper ISE in findAttribute
JspContextWrapper.findAttribute should ignore expired sessions rather
than throw an IllegalStateException.
---
java/org/apache/jasper/runtime/JspContextWrapper.java | 7 ++++++-
webapps/docs/changelog.xml | 9 +++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/jasper/runtime/JspContextWrapper.java b/java/org/apache/jasper/runtime/JspContextWrapper.java
index 707bdd2..746be09 100644
--- a/java/org/apache/jasper/runtime/JspContextWrapper.java
+++ b/java/org/apache/jasper/runtime/JspContextWrapper.java
@@ -200,7 +200,12 @@ public class JspContextWrapper extends PageContext implements VariableResolver {
o = rootJspCtxt.getAttribute(name, REQUEST_SCOPE);
if (o == null) {
if (getSession() != null) {
- o = rootJspCtxt.getAttribute(name, SESSION_SCOPE);
+ try {
+ o = rootJspCtxt.getAttribute(name, SESSION_SCOPE);
+ } catch (IllegalStateException ise) {
+ // Session has been invalidated.
+ // Ignore and fall through to application scope.
+ }
}
if (o == null) {
o = rootJspCtxt.getAttribute(name, APPLICATION_SCOPE);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 89f50f1..92a937a 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -124,6 +124,15 @@
</add>
</changelog>
</subsection>
+ <subsection name="Jasper">
+ <changelog>
+ <fix>
+ <bug>64965</bug>: <code>JspContextWrapper.findAttribute</code> should
+ ignore expired sessions rather than throw an
+ <code>IllegalStateException</code>. (remm)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Other">
<changelog>
<add>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org