Skip to content

Commit 8aea916

Browse files
author
Ronald Holshausen
committedNov 4, 2019
feat: add a system property to turn off XML DTD validation in the matcher #973
1 parent cd1df8d commit 8aea916

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎core/matchers/src/main/kotlin/au/com/dius/pact/core/matchers/XmlBodyMatcher.kt

+3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ object XmlBodyMatcher : BodyMatcher, KLogging() {
4040
TextImpl()
4141
} else {
4242
val dbFactory = DocumentBuilderFactory.newInstance()
43+
if (System.getProperty("pact.matching.xml.validating") == "false") {
44+
dbFactory.isValidating = false
45+
}
4346
val dBuilder = dbFactory.newDocumentBuilder()
4447
val xmlInput = InputSource(StringReader(xmlData))
4548
val doc = dBuilder.parse(xmlInput)

0 commit comments

Comments
 (0)
Please sign in to comment.