tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject [tomcat] branch master updated: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63897 JSP timestamps
Date Mon, 04 Nov 2019 15:17:24 GMT
This is an automated email from the ASF dual-hosted git repository.

markt 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 066e254  Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63897 JSP timestamps
066e254 is described below

commit 066e254674dcceaf18311d31cc579488bf7ce827
Author: Mark Thomas <markt@apache.org>
AuthorDate: Mon Nov 4 15:13:00 2019 +0000

    Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63897 JSP timestamps
    
    Capture the timestamp of a JSP for the purposes of modification tracking
    before the JSP is compiled to prevent a race condition if the JSP is
    modified during compilation. Patch provided by Karl von Randow.
---
 java/org/apache/jasper/compiler/Compiler.java |  2 +-
 webapps/docs/changelog.xml                    | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/jasper/compiler/Compiler.java b/java/org/apache/jasper/compiler/Compiler.java
index 207a978..748bb89 100644
--- a/java/org/apache/jasper/compiler/Compiler.java
+++ b/java/org/apache/jasper/compiler/Compiler.java
@@ -382,9 +382,9 @@ public abstract class Compiler {
         }
 
         try {
+            final Long jspLastModified = ctxt.getLastModified(ctxt.getJspFile());
             Map<String,SmapStratum> smaps = generateJava();
             File javaFile = new File(ctxt.getServletJavaFileName());
-            Long jspLastModified = ctxt.getLastModified(ctxt.getJspFile());
             if (!javaFile.setLastModified(jspLastModified.longValue())) {
                 throw new JasperException(Localizer.getMessage("jsp.error.setLastModified",
javaFile));
             }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 75e11fc..9f46cb5 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -117,6 +117,16 @@
       </fix>
     </changelog>
   </subsection>
+  <subsection name="Jasper">
+    <changelog>
+      <fix>
+        <bug>63897</bug>: Capture the timestamp of a JSP for the purposes of
+        modification tracking before the JSP is compiled to prevent a race
+        condition if the JSP is modified during compilation. Patch provided by
+        Karl von Randow. (markt)
+      </fix>
+    </changelog>
+  </subsection>
   <subsection name="Web applications">
     <changelog>
       <fix>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message