garydgregory commented on code in PR #393:
URL: https://github.com/apache/commons-scxml/pull/393#discussion_r3944024287
##########
src/main/java/org/apache/commons/scxml2/io/ContentParser.java:
##########
@@ -224,7 +226,8 @@ public ParsedValue parseResource(final String resourceURL)
throws IOException {
public Node parseXml(final String xmlString) throws IOException {
Document doc;
try {
- doc =
DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(xmlString);
+ // Wrap in an InputSource: DocumentBuilder.parse(String) would
interpret the content as a URI.
+ doc =
SecureDocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new
InputSource(new StringReader(xmlString)));
Review Comment:
@ppkarwasz
I think we need a unit test to validate this bug fix.
--
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]