summaryrefslogtreecommitdiffstats
path: root/mdsal-resource/provider
diff options
context:
space:
mode:
authorAgarwal, Ruchira (ra1926) <ra1926@att.com>2019-11-05 18:16:50 +0000
committerAgarwal, Ruchira (ra1926) <ra1926@att.com>2019-11-05 18:16:50 +0000
commit83559ddc77a0217391212f2abcdcba2c3ff56937 (patch)
tree4a74c900ba401be5099d08371d6e2c79967d0555 /mdsal-resource/provider
parent5c6b2000726e657eb6a1ed468ae14f95e9df0ce4 (diff)
minor updates to clean up code
clean up code to sync with internal Issue-ID: CCSDK-1873 Signed-off-by: Agarwal, Ruchira (ra1926) <ra1926@att.com> Change-Id: Idcc7186d5aaa783c527de3986e7a1ecd9bfcf651
Diffstat (limited to 'mdsal-resource/provider')
-rw-r--r--mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/RestService.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/RestService.java b/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/RestService.java
index 2991e6be..30859a49 100644
--- a/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/RestService.java
+++ b/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/RestService.java
@@ -34,6 +34,7 @@ import java.net.URL;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLSession;
+import javax.xml.XMLConstants;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -180,9 +181,11 @@ public class RestService {
LOG.info("Response body :\n"+respString);
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ dbf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
+ dbf.setFeature("http://xml.org/sax/features/external-general-entities", false);
+ dbf.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
DocumentBuilder db = dbf.newDocumentBuilder();
-
response = db.parse(new ByteArrayInputStream(respString.getBytes()));
} catch (Exception e) {