File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
ruby/ql/lib/codeql/ruby/frameworks/actioncontroller Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ private import codeql.ruby.controlflow.CfgNodes::ExprNodes
9
9
private import codeql.ruby.DataFlow
10
10
private import codeql.ruby.dataflow.internal.DataFlowPrivate as DataFlowPrivate
11
11
private import codeql.ruby.ast.internal.Constant
12
+ private import codeql.ruby.ast.internal.Module
12
13
13
14
/**
14
15
* Provides modeling for ActionController filters.
@@ -109,7 +110,7 @@ module Filters {
109
110
}
110
111
111
112
/**
112
- * Gets the callable that implements the filter with name `name` .
113
+ * Gets the callable that implements a filter registered by this call .
113
114
* This currently only finds methods in the local class or superclass.
114
115
* It doesn't handle:
115
116
* - lambdas
@@ -127,9 +128,8 @@ module Filters {
127
128
* ```
128
129
*/
129
130
Callable getAFilterCallable ( ) {
130
- this .getFilterArgumentName ( ) = result .( MethodBase ) .getName ( ) and
131
- result .getEnclosingModule ( ) .getModule ( ) =
132
- this .getExpr ( ) .getEnclosingModule ( ) .getModule ( ) .getAnAncestor ( )
131
+ result =
132
+ lookupMethod ( this .getExpr ( ) .getEnclosingModule ( ) .getModule ( ) , this .getFilterArgumentName ( ) )
133
133
}
134
134
}
135
135
You can’t perform that action at this time.
0 commit comments