ppkarwasz commented on code in PR #4198:
URL: https://github.com/apache/logging-log4j2/pull/4198#discussion_r3695475509
##########
log4j-1.2-api/src/main/java/org/apache/log4j/xml/XmlConfiguration.java:
##########
@@ -180,6 +181,27 @@ private void doConfigure(final ParseAction action) throws
FactoryConfigurationEr
}
}
+ private static void disableDtdProcessing(final DocumentBuilderFactory
factory) {
+ factory.setValidating(false);
+ factory.setExpandEntityReferences(false);
+ setFeature(factory,
"http://xml.org/sax/features/external-general-entities", false);
+ setFeature(factory,
"http://xml.org/sax/features/external-parameter-entities", false);
+ setFeature(factory,
"http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
Review Comment:
As the name suggests, this setting applies to **non-validating** parsers.
Resolving the external subset is **required** in validating parsers and can not
be turned off.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]