@@ -37,18 +37,18 @@ public static Response specificContentType(boolean safeContentType, boolean chai
37
37
else {
38
38
if (chainDirectly ) {
39
39
if (contentTypeFirst )
40
- return builder .type (MediaType .APPLICATION_JSON ).entity (userControlled ).build (); // $xss
40
+ return builder .type (MediaType .APPLICATION_JSON ).entity (userControlled ).build ();
41
41
else
42
- return builder .entity (userControlled ).type (MediaType .APPLICATION_JSON ).build (); // $xss
42
+ return builder .entity (userControlled ).type (MediaType .APPLICATION_JSON ).build ();
43
43
}
44
44
else {
45
45
if (contentTypeFirst ) {
46
46
Response .ResponseBuilder builder2 = builder .type (MediaType .APPLICATION_JSON );
47
- return builder2 .entity (userControlled ).build (); // $xss
47
+ return builder2 .entity (userControlled ).build ();
48
48
}
49
49
else {
50
50
Response .ResponseBuilder builder2 = builder .entity (userControlled );
51
- return builder2 .type (MediaType .APPLICATION_JSON ).build (); // $xss
51
+ return builder2 .type (MediaType .APPLICATION_JSON ).build ();
52
52
}
53
53
}
54
54
}
@@ -188,7 +188,7 @@ public static Response methodContentTypeUnsafeOverriddenWithSafe(String userCont
188
188
189
189
@ Path ("/abc" )
190
190
@ Produces ({"application/json" })
191
- private static class ClassContentTypeSafe {
191
+ public static class ClassContentTypeSafe {
192
192
@ GET
193
193
public Response test (String userControlled ) {
194
194
return Response .ok (userControlled ).build ();
@@ -212,7 +212,7 @@ public Response overridesWithUnsafe2(String userControlled) {
212
212
213
213
@ Path ("/abc" )
214
214
@ Produces ({"text/html" })
215
- private static class ClassContentTypeUnsafe {
215
+ public static class ClassContentTypeUnsafe {
216
216
@ GET
217
217
public Response test (String userControlled ) {
218
218
return Response .ok (userControlled ).build (); // $MISSING: xss
0 commit comments