jmestwa-coder commented on code in PR #4198:
URL: https://github.com/apache/logging-log4j2/pull/4198#discussion_r3702322760
##########
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:
right, missed that this feature only applies to non-validating parsers.
dropped the feature-based approach entirely in favor of the resolver.
--
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]