File tree Expand file tree Collapse file tree
ruby/ql/lib/codeql/ruby/frameworks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ abstract class ParamsCall extends MethodCall {
127127 * ActionController parameters available via the `params` method.
128128 */
129129class ParamsSource extends RemoteFlowSource:: Range {
130- ParamsSource ( ) { exists ( ParamsCall call | this .asExpr ( ) .getExpr ( ) = call ) }
130+ ParamsSource ( ) { this .asExpr ( ) .getExpr ( ) instanceof ParamsCall }
131131
132132 override string getSourceType ( ) { result = "ActionController::Metal#params" }
133133}
@@ -144,7 +144,7 @@ abstract class CookiesCall extends MethodCall {
144144 * ActionController parameters available via the `cookies` method.
145145 */
146146class CookiesSource extends RemoteFlowSource:: Range {
147- CookiesSource ( ) { exists ( CookiesCall call | this .asExpr ( ) .getExpr ( ) = call ) }
147+ CookiesSource ( ) { this .asExpr ( ) .getExpr ( ) instanceof CookiesCall }
148148
149149 override string getSourceType ( ) { result = "ActionController::Metal#cookies" }
150150}
Original file line number Diff line number Diff line change @@ -19,19 +19,14 @@ module Kernel {
1919 */
2020 class KernelMethodCall extends DataFlow:: CallNode {
2121 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 ( ) )
3530 )
3631 }
3732 }
You can’t perform that action at this time.
0 commit comments