ppkarwasz commented on code in PR #393:
URL: https://github.com/apache/commons-scxml/pull/393#discussion_r3987280395
##########
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:
I added a test in
https://github.com/apache/commons-scxml/pull/393/commits/5b1f1901a086d8ce26d76fcd73aea17f879b42d0
--
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]