File tree Expand file tree Collapse file tree 2 files changed +10
-15
lines changed
ruby/ql/lib/codeql/ruby/frameworks Expand file tree Collapse file tree 2 files changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ abstract class ParamsCall extends MethodCall {
127
127
* ActionController parameters available via the `params` method.
128
128
*/
129
129
class ParamsSource extends RemoteFlowSource:: Range {
130
- ParamsSource ( ) { exists ( ParamsCall call | this .asExpr ( ) .getExpr ( ) = call ) }
130
+ ParamsSource ( ) { this .asExpr ( ) .getExpr ( ) instanceof ParamsCall }
131
131
132
132
override string getSourceType ( ) { result = "ActionController::Metal#params" }
133
133
}
@@ -144,7 +144,7 @@ abstract class CookiesCall extends MethodCall {
144
144
* ActionController parameters available via the `cookies` method.
145
145
*/
146
146
class CookiesSource extends RemoteFlowSource:: Range {
147
- CookiesSource ( ) { exists ( CookiesCall call | this .asExpr ( ) .getExpr ( ) = call ) }
147
+ CookiesSource ( ) { this .asExpr ( ) .getExpr ( ) instanceof CookiesCall }
148
148
149
149
override string getSourceType ( ) { result = "ActionController::Metal#cookies" }
150
150
}
Original file line number Diff line number Diff line change @@ -19,19 +19,14 @@ module Kernel {
19
19
*/
20
20
class KernelMethodCall extends DataFlow:: CallNode {
21
21
KernelMethodCall ( ) {
22
- exists ( MethodCall methodCall |
23
- methodCall = this .asExpr ( ) .getExpr ( ) and
24
- (
25
- this = API:: getTopLevelMember ( "Kernel" ) .getAMethodCall ( _)
26
- or
27
- methodCall instanceof UnknownMethodCall and
28
- (
29
- this .getReceiver ( ) .asExpr ( ) .getExpr ( ) instanceof SelfVariableAccess and
30
- isPrivateKernelMethod ( methodCall .getMethodName ( ) )
31
- or
32
- isPublicKernelMethod ( methodCall .getMethodName ( ) )
33
- )
34
- )
22
+ this = API:: getTopLevelMember ( "Kernel" ) .getAMethodCall ( _)
23
+ or
24
+ this .asExpr ( ) .getExpr ( ) instanceof UnknownMethodCall and
25
+ (
26
+ this .getReceiver ( ) .asExpr ( ) .getExpr ( ) instanceof SelfVariableAccess and
27
+ isPrivateKernelMethod ( this .getMethodName ( ) )
28
+ or
29
+ isPublicKernelMethod ( this .getMethodName ( ) )
35
30
)
36
31
}
37
32
}
You can’t perform that action at this time.
0 commit comments