Spring content types: recognise constant content-type strings

This commit is contained in:
Chris Smowton
2021-06-22 19:26:16 +01:00
parent 4397371a50
commit 701d0bcdca
3 changed files with 24 additions and 5 deletions

View File

@@ -60,7 +60,7 @@ public class SpringXSS {
@GetMapping(value = "/xyz", produces = MediaType.TEXT_HTML_VALUE)
public static ResponseEntity<String> methodContentTypeUnsafe(String userControlled) {
return ResponseEntity.ok(userControlled); // $MISSING: xss
return ResponseEntity.ok(userControlled); // $xss
}
@GetMapping(value = "/xyz", produces = "text/html")