This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
     new 1d29e7940b Fix BZ 66536 - tag directives could be ignored for some 
pages
1d29e7940b is described below

commit 1d29e7940b2bc7a2eb6cf173d4cc4451091074d0
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Mar 22 17:14:32 2023 +0000

    Fix BZ 66536 - tag directives could be ignored for some pages
    
    https://bz.apache.org/bugzilla/show_bug.cgi?id=66536
---
 java/org/apache/jasper/compiler/ParserController.java | 4 ++--
 webapps/docs/changelog.xml                            | 8 ++++++++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/jasper/compiler/ParserController.java 
b/java/org/apache/jasper/compiler/ParserController.java
index 3992454195..67e75fc07f 100644
--- a/java/org/apache/jasper/compiler/ParserController.java
+++ b/java/org/apache/jasper/compiler/ParserController.java
@@ -453,8 +453,8 @@ class ParserController implements TagConstants {
                 continue;
             }
 
-            // compare for "tag ", so we don't match "taglib"
-            if (jspReader.matches("tag ") || jspReader.matches("page")) {
+            // Want to match tag and page but not taglib
+            if (jspReader.matches("tag") && !jspReader.matches("lib") || 
jspReader.matches("page")) {
 
                 jspReader.skipSpaces();
                 Attributes attrs = Parser.parseAttributes(this, jspReader);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index c2423794f4..361b5a9b45 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -173,6 +173,14 @@
       </fix>
     </changelog>
   </subsection>
+  <subsection name="Jasper">
+    <changelog>
+      <fix>
+        <bug>66536</bug>: Fix parsing of tag files that meant that tag
+        directives could be ignored for some tag files. (markt)
+      </fix>
+    </changelog>
+  </subsection>
   <subsection name="WebSocket">
     <changelog>
       <fix>


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

Reply via email to