Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ private void parseDataCiteXml(String dataciteXmlUrl, CloseableHttpClient client,
String xmlContent = EntityUtils.toString(xmlResponse.getEntity(), "UTF-8");
logger.fine("Retrieved DataCite XML");

javax.xml.parsers.DocumentBuilderFactory factory = javax.xml.parsers.DocumentBuilderFactory.newInstance();
javax.xml.parsers.DocumentBuilderFactory factory = edu.harvard.iq.dataverse.util.xml.XmlUtil.getSecureDocumentBuilderFactory();
factory.setNamespaceAware(true);
javax.xml.parsers.DocumentBuilder builder = factory.newDocumentBuilder();
org.w3c.dom.Document doc = builder.parse(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ private String lookupShibbolethEntityId() {
XMLStreamReader xmlr = null;

try {
XMLInputFactory xmlFactory = javax.xml.stream.XMLInputFactory.newInstance();
XMLInputFactory xmlFactory = edu.harvard.iq.dataverse.util.xml.XmlUtil.getSecureXMLInputFactory();
xmlr = xmlFactory.createXMLStreamReader(new InputStreamReader((InputStream) metadataRequest.getInputStream()));

while ( xmlr.next() == XMLStreamConstants.COMMENT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ protected Optional<AuthenticatedUserDisplayInfo> getOrganizationalData(OAuth2Acc
}

protected AuthenticatedUserDisplayInfo parseActivitiesResponse( String responseBody ) {
DocumentBuilderFactory dbFact = DocumentBuilderFactory.newInstance();
DocumentBuilderFactory dbFact = edu.harvard.iq.dataverse.util.xml.XmlUtil.getSecureDocumentBuilderFactory();

try ( StringReader reader = new StringReader(responseBody)) {
DocumentBuilder db = dbFact.newDocumentBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public String getAffiliationViaMDQ(String shibIdp) {
XMLStreamReader xmlr = null;

try {
XMLInputFactory xmlFactory = javax.xml.stream.XMLInputFactory.newInstance();
XMLInputFactory xmlFactory = edu.harvard.iq.dataverse.util.xml.XmlUtil.getSecureXMLInputFactory();
xmlr = xmlFactory.createXMLStreamReader(new InputStreamReader((InputStream) mdqApiRequest.getInputStream()));

while ( xmlr.next() == XMLStreamConstants.COMMENT );
Expand Down
Loading