You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ni...@apache.org on 2017/04/20 13:55:45 UTC

ambari git commit: AMBARI-20635. Implement XML processing best practices in Hive View 1.0 and 1.5. (dipayanb via nitirajrathore)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 0f4adf610 -> bf491bced


AMBARI-20635. Implement XML processing best practices in Hive View 1.0 and 1.5. (dipayanb via nitirajrathore)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bf491bce
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bf491bce
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bf491bce

Branch: refs/heads/branch-2.4
Commit: bf491bcedbdbc531fc3cb578143e665b9be78b90
Parents: 0f4adf6
Author: Nitiraj Singh Rathore <ni...@gmail.com>
Authored: Thu Apr 20 19:24:29 2017 +0530
Committer: Nitiraj Singh Rathore <ni...@gmail.com>
Committed: Thu Apr 20 19:24:29 2017 +0530

----------------------------------------------------------------------
 .../ambari/view/hive2/resources/uploads/parsers/xml/XMLParser.java | 2 ++
 .../ambari/view/hive/resources/uploads/parsers/xml/XMLParser.java  | 2 ++
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/bf491bce/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/parsers/xml/XMLParser.java
----------------------------------------------------------------------
diff --git a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/parsers/xml/XMLParser.java b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/parsers/xml/XMLParser.java
index 95e996c..e2be5db 100644
--- a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/parsers/xml/XMLParser.java
+++ b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/parsers/xml/XMLParser.java
@@ -63,6 +63,8 @@ public class XMLParser extends Parser {
     super(reader, parseOptions);
     XMLInputFactory factory = XMLInputFactory.newInstance();
     try {
+      factory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
+      factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);
       this.xmlReader = factory.createXMLEventReader(reader);
     } catch (XMLStreamException e) {
       LOG.error("error occurred while creating xml reader : ", e);

http://git-wip-us.apache.org/repos/asf/ambari/blob/bf491bce/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/xml/XMLParser.java
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/xml/XMLParser.java b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/xml/XMLParser.java
index 4edc82c..6ac11d5 100644
--- a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/xml/XMLParser.java
+++ b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/xml/XMLParser.java
@@ -63,6 +63,8 @@ public class XMLParser extends Parser {
     super(reader, parseOptions);
     XMLInputFactory factory = XMLInputFactory.newInstance();
     try {
+      factory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
+      factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);
       this.xmlReader = factory.createXMLEventReader(reader);
     } catch (XMLStreamException e) {
       LOG.error("error occurred while creating xml reader : ", e);