eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jay...@apache.org
Subject eagle git commit: [EAGLE-1077] Set the secure processing feature on all DocumentBuilder…
Date Wed, 31 Jan 2018 19:30:38 GMT
Repository: eagle
Updated Branches:
  refs/heads/master 5ee33c850 -> 732a8654c


[EAGLE-1077] Set the secure processing feature on all DocumentBuilder…

…Factory instances

<!--
{% comment %}
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements.  See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to you under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License.  You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
{% endcomment %}
-->

Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

 - [ ] Make sure the PR title is formatted like:
   `[EAGLE-<Jira issue #>] Description of pull request`
 - [ ] Make sure tests pass via `mvn clean verify`. (Even better, enable
       Travis-CI on your fork and ensure the whole test matrix passes).
 - [ ] Replace `<Jira issue #>` in the title with the actual Jira issue
       number, if there is one.
 - [ ] If this contribution is large, please file an Apache
       [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.txt).

---

Author: Colm O hEigeartaigh <coheigea@apache.org>

Closes #980 from coheigea/EAGLE-1077.


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

Branch: refs/heads/master
Commit: 732a8654c98b8fc8b01d669d3c9ac99657072566
Parents: 5ee33c8
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Wed Jan 31 11:30:34 2018 -0800
Committer: Jay Sen <jsenjaliya@paypal.com>
Committed: Wed Jan 31 11:30:34 2018 -0800

----------------------------------------------------------------------
 .../java/org/apache/eagle/jpm/mr/running/parser/MRJobParser.java | 4 +++-
 .../apache/eagle/security/hive/jobrunning/HiveJobFetchSpout.java | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/eagle/blob/732a8654/eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobParser.java
----------------------------------------------------------------------
diff --git a/eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobParser.java
b/eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobParser.java
index 1330e3f..d140c8a 100644
--- a/eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobParser.java
+++ b/eagle-jpm/eagle-jpm-mr-running/src/main/java/org/apache/eagle/jpm/mr/running/parser/MRJobParser.java
@@ -50,6 +50,7 @@ import java.io.InputStream;
 import java.net.URLConnection;
 import java.util.*;
 import java.util.function.Function;
+import javax.xml.XMLConstants;
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 
@@ -517,6 +518,7 @@ public class MRJobParser implements Runnable {
             connection.setReadTimeout(READ_TIMEOUT);
             is = connection.getInputStream();
             DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+            dbf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE);
             DocumentBuilder db = dbf.newDocumentBuilder();
             Document dt = db.parse(is);
             Element element = dt.getDocumentElement();
@@ -608,4 +610,4 @@ public class MRJobParser implements Runnable {
         mrJobAnalysisEntity.setProgress(this.app.getProgress());
         return mrJobAnalysisEntity;
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/eagle/blob/732a8654/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/jobrunning/HiveJobFetchSpout.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/jobrunning/HiveJobFetchSpout.java
b/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/jobrunning/HiveJobFetchSpout.java
index 08a3251..fed5611 100644
--- a/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/jobrunning/HiveJobFetchSpout.java
+++ b/eagle-security/eagle-security-hive/src/main/java/org/apache/eagle/security/hive/jobrunning/HiveJobFetchSpout.java
@@ -44,6 +44,7 @@ import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
+import javax.xml.XMLConstants;
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import java.io.InputStream;
@@ -201,6 +202,7 @@ public class HiveJobFetchSpout extends BaseRichSpout {
                 is = connection.getInputStream();
                 Map<String, String> hiveQueryLog = new HashMap<>();
                 DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+                dbf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE);
                 DocumentBuilder db = dbf.newDocumentBuilder();
                 Document dt = db.parse(is);
                 Element element = dt.getDocumentElement();


Mime
View raw message