Skip to content

Commit

Permalink
Merge pull request playframework#602 from Lejdborg/patch-xxe-injection
Browse files Browse the repository at this point in the history
Prevent XXE injection when parsing XML
  • Loading branch information
mkurz authored Jul 19, 2023
2 parents 97f36e9 + 26c9e74 commit e5ab9fb
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 e5ab9fb

Please sign in to comment.