Skip to content

Commit

Permalink
Prevent XXE injection when parsing XML
Browse files Browse the repository at this point in the history
  • Loading branch information
Lejdborg authored Aug 16, 2021
1 parent c842903 commit 26c9e74
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ trait XMLBodyReadables {
* }}}
*/
implicit val readableAsXml: BodyReadable[Elem] = BodyReadable { response =>
xml.XML.load(new InputSource(new ByteArrayInputStream(response.bodyAsBytes.toArray)))
XML.parser.load(new InputSource(new ByteArrayInputStream(response.bodyAsBytes.toArray)))
}

}
Expand Down

0 comments on commit 26c9e74

Please sign in to comment.