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
13
13
abstract class RequestGetMethod extends Method {
14
14
RequestGetMethod ( ) {
15
15
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.
17
20
ma .getMethod ( ) instanceof ServletRequestGetBodyMethod and
18
21
this .polyCalls * ( ma .getEnclosingCallable ( ) )
19
22
)
You can’t perform that action at this time.
0 commit comments