Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -727,7 +727,4 @@ public enum ENDPOINT_TIMEOUT_TYPE { ENDPOINT_TIMEOUT, GLOBAL_TIMEOUT, HTTP_CONNE

public static final String DEFAULT_ERROR_TYPE = "ANY";
public static final String ERROR_STATS_REPORTED = "ERROR_STATS_REPORTED";
public static final String ENABLE_DTD_FORCEFULLY = "payloadFactory.forcefully.enable.DTD";
public static final String ENABLE_EXTERNAL_ENTITY_FORCEFULLY
= "payloadFactory.forcefully.enable.external.entity";
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import org.apache.axiom.om.OMText;
import org.apache.axiom.om.impl.builder.StAXBuilder;
import org.apache.axiom.om.impl.builder.StAXOMBuilder;
import org.apache.axiom.om.util.StAXUtils;
import org.apache.axiom.soap.SOAP11Constants;
import org.apache.axiom.soap.SOAP12Constants;
import org.apache.axiom.soap.SOAPEnvelope;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.synapse.MessageContext;
import org.apache.synapse.SynapseConstants;
import org.apache.synapse.SynapseException;
import org.apache.synapse.commons.json.JsonUtil;
import org.apache.synapse.config.xml.SynapsePath;
Expand Down Expand Up @@ -553,16 +552,5 @@ public static void readInputFactoryProperties(XMLInputFactory inputFactory) {
}
inputFactory.setProperty(XMLInputFactory.SUPPORT_DTD, Boolean.FALSE);
inputFactory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, Boolean.FALSE);
if (Boolean.parseBoolean(System.getProperty(SynapseConstants.ENABLE_DTD_FORCEFULLY))) {
inputFactory.setProperty(XMLInputFactory.SUPPORT_DTD, Boolean.TRUE);
log.warn("Support for DTDs is enabled forcefully. "
+ "This may lead to XXE vulnerabilities. Use with caution!");
}
if (Boolean.parseBoolean(
System.getProperty(SynapseConstants.ENABLE_EXTERNAL_ENTITY_FORCEFULLY))) {
inputFactory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, Boolean.TRUE);
log.warn("Support for External Entities is enabled forcefully."
+ " This may lead to XXE vulnerabilities. Use with caution!");
}
}
}
Loading