|
@@ -56,6 +56,7 @@ import org.apache.hadoop.io.Text;
|
|
|
import org.apache.hadoop.security.Credentials;
|
|
|
import org.apache.hadoop.security.authentication.server.AuthenticationFilter;
|
|
|
import org.apache.hadoop.security.authentication.server.PseudoAuthenticationHandler;
|
|
|
+import org.apache.hadoop.util.XMLUtils;
|
|
|
import org.apache.hadoop.yarn.api.records.ApplicationAccessType;
|
|
|
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
|
|
import org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext;
|
|
@@ -532,7 +533,7 @@ public class TestRMWebServicesAppsModification extends JerseyTestBase {
|
|
|
assertEquals(MediaType.APPLICATION_XML_TYPE + "; " + JettyUtils.UTF_8,
|
|
|
response.getType().toString());
|
|
|
String xml = response.getEntity(String.class);
|
|
|
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
|
|
+ DocumentBuilderFactory dbf = XMLUtils.newSecureDocumentBuilderFactory();
|
|
|
DocumentBuilder db = dbf.newDocumentBuilder();
|
|
|
InputSource is = new InputSource();
|
|
|
is.setCharacterStream(new StringReader(xml));
|
|
@@ -733,7 +734,7 @@ public class TestRMWebServicesAppsModification extends JerseyTestBase {
|
|
|
|
|
|
protected String validateGetNewApplicationXMLResponse(String response)
|
|
|
throws ParserConfigurationException, IOException, SAXException {
|
|
|
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
|
|
+ DocumentBuilderFactory dbf = XMLUtils.newSecureDocumentBuilderFactory();
|
|
|
DocumentBuilder db = dbf.newDocumentBuilder();
|
|
|
InputSource is = new InputSource();
|
|
|
is.setCharacterStream(new StringReader(response));
|
|
@@ -1299,7 +1300,7 @@ public class TestRMWebServicesAppsModification extends JerseyTestBase {
|
|
|
assertEquals(MediaType.APPLICATION_XML_TYPE + "; " + JettyUtils.UTF_8,
|
|
|
response.getType().toString());
|
|
|
String xml = response.getEntity(String.class);
|
|
|
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
|
|
+ DocumentBuilderFactory dbf = XMLUtils.newSecureDocumentBuilderFactory();
|
|
|
DocumentBuilder db = dbf.newDocumentBuilder();
|
|
|
InputSource is = new InputSource();
|
|
|
is.setCharacterStream(new StringReader(xml));
|
|
@@ -1329,7 +1330,7 @@ public class TestRMWebServicesAppsModification extends JerseyTestBase {
|
|
|
assertEquals(MediaType.APPLICATION_XML_TYPE + "; " + JettyUtils.UTF_8,
|
|
|
response.getType().toString());
|
|
|
String xml = response.getEntity(String.class);
|
|
|
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
|
|
+ DocumentBuilderFactory dbf = XMLUtils.newSecureDocumentBuilderFactory();
|
|
|
DocumentBuilder db = dbf.newDocumentBuilder();
|
|
|
InputSource is = new InputSource();
|
|
|
is.setCharacterStream(new StringReader(xml));
|
|
@@ -1466,7 +1467,7 @@ public class TestRMWebServicesAppsModification extends JerseyTestBase {
|
|
|
assertEquals(MediaType.APPLICATION_XML_TYPE + "; " + JettyUtils.UTF_8,
|
|
|
response.getType().toString());
|
|
|
String xml = response.getEntity(String.class);
|
|
|
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
|
|
+ DocumentBuilderFactory dbf = XMLUtils.newSecureDocumentBuilderFactory();
|
|
|
DocumentBuilder db = dbf.newDocumentBuilder();
|
|
|
InputSource is = new InputSource();
|
|
|
is.setCharacterStream(new StringReader(xml));
|