First steps in XXE integration tests

This commit is contained in:
Rene Zubcevic
2019-09-18 14:48:34 +02:00
parent 57e6a84cef
commit ec236a4ff5
5 changed files with 87 additions and 6 deletions

View File

@ -67,7 +67,7 @@ public class ContentTypeAssignment extends AssignmentEndpoint {
attackResult = failed().feedback("xxe.content.type.feedback.json").build();
}
if (MediaType.APPLICATION_XML_VALUE.equals(contentType)) {
if (null != contentType && contentType.contains(MediaType.APPLICATION_XML_VALUE)) {
String error = "";
try {
Comment comment = comments.parseXml(commentStr);