File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
java/ql/src/experimental/Security/CWE/CWE-352 Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,10 @@ import semmle.code.java.frameworks.spring.SpringController
1313abstract class RequestGetMethod extends Method {
1414 RequestGetMethod ( ) {
1515 not exists ( MethodAccess ma |
16- // Exclude apparent GET handlers that read a request entity, because this is the principle of JSONP.
16+ // Exclude apparent GET handlers that read a request entity, because this likely indicates this is not in fact a GET handler.
17+ // This is particularly a problem with Spring handlers, which can sometimes neglect to specify a request method.
18+ // Even if it is in fact a GET handler, such a request method will be unusable in the context `<script src="...">`,
19+ // which is the typical use-case for JSONP but cannot supply a request body.
1720 ma .getMethod ( ) instanceof ServletRequestGetBodyMethod and
1821 this .polyCalls * ( ma .getEnclosingCallable ( ) )
1922 )
You can’t perform that action at this time.
0 commit comments