Author: markt
Date: Mon Jan 13 13:59:12 2014
New Revision: 1557719

URL: http://svn.apache.org/r1557719
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55973
Fix processing of XML schemas when validation is enabled in Jasper
Back-port of http://svn.apache.org/r1556377

Modified:
    tomcat/tc6.0.x/trunk/STATUS.txt
    tomcat/tc6.0.x/trunk/java/org/apache/jasper/xmlparser/ParserUtils.java
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1557719&r1=1557718&r2=1557719&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Mon Jan 13 13:59:12 2014
@@ -61,12 +61,6 @@ PATCHES PROPOSED TO BACKPORT:
       requires Ant >= 1.8.0).
   -1:
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55973
-  Fix processing of XML schemas when validation is enabled in Jasper
-  http://svn.apache.org/r1556377
-  +1: kkolinko, jboynes, markt
-  -1:
-
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55119
   Avoid CVE-2013-1571 when generating Javadoc
   http://svn.apache.org/r1495875

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/xmlparser/ParserUtils.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/xmlparser/ParserUtils.java?rev=1557719&r1=1557718&r2=1557719&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/xmlparser/ParserUtils.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/xmlparser/ParserUtils.java Mon 
Jan 13 13:59:12 2014
@@ -109,6 +109,16 @@ public class ParserUtils {
                 DocumentBuilderFactory.newInstance();
             factory.setNamespaceAware(true);
             factory.setValidating(useValidation);
+            if (useValidation) {
+                // Enable DTD validation
+                factory.setFeature(
+                        "http://xml.org/sax/features/validation";,
+                        true);
+                // Enable schema validation
+                factory.setFeature(
+                        "http://apache.org/xml/features/validation/schema";,
+                        true);
+            }
             DocumentBuilder builder = factory.newDocumentBuilder();
             builder.setEntityResolver(entityResolverInstance);
             XmlErrorHandler handler = new XmlErrorHandler();

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1557719&r1=1557718&r2=1557719&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Mon Jan 13 13:59:12 2014
@@ -148,6 +148,10 @@
         <bug>55691</bug>: Fix <code>javax.el.ArrayELResolver</code> to 
correctly
         handle the case where the base object is an array of primitives. 
(markt)
       </fix>
+      <fix>
+        <bug>55973</bug>: Fix processing of XML schemas when validation is
+        enabled in Jasper. (kkolinko)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Web applications">



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

Reply via email to