File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
ruby/ql/lib/codeql/ruby/frameworks/actioncontroller Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -65,14 +65,13 @@ module Filters {
65
65
not exists ( this .getOnlyArgument ( ) ) and
66
66
forall ( string except | except = this .getExceptArgument ( ) | result .getName ( ) != except )
67
67
) and
68
- // This is a simple heuristic and will miss some cases.
69
68
(
70
- // The action is in the same class as this call
71
- result = lookupMethod ( this .getExpr ( ) .getEnclosingModule ( ) .getModule ( ) , _)
69
+ result = this .getExpr ( ) .getEnclosingModule ( ) .getAMethod ( )
72
70
or
73
- // or the action is in an immediate subclass of this call
74
- result .getEnclosingModule ( ) .getModule ( ) .getAnImmediateAncestor ( ) =
75
- this .getExpr ( ) .getEnclosingModule ( ) .getModule ( )
71
+ exists ( ModuleBase m |
72
+ m .getModule ( ) = this .getExpr ( ) .getEnclosingModule ( ) .getModule ( ) .getADescendent ( ) and
73
+ result = m .getAMethod ( )
74
+ )
76
75
)
77
76
}
78
77
You can’t perform that action at this time.
0 commit comments