File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
ruby/ql/lib/codeql/ruby/frameworks/actioncontroller Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,10 @@ module Filters {
104104
105105 StringlikeLiteralCfgNode getFilterArgument ( ) { result = this .getPositionalArgument ( _) }
106106
107+ string getFilterArgumentName ( ) {
108+ result = this .getFilterArgument ( ) .getConstantValue ( ) .getStringlikeValue ( )
109+ }
110+
107111 /**
108112 * Gets the callable that implements the filter with name `name`.
109113 * This currently only finds methods in the local class or superclass.
@@ -122,8 +126,8 @@ module Filters {
122126 * end
123127 * ```
124128 */
125- Callable getFilterCallable ( string name ) {
126- result .( MethodBase ) .getName ( ) = name and
129+ Callable getAFilterCallable ( ) {
130+ this . getFilterArgumentName ( ) = result .( MethodBase ) .getName ( ) and
127131 result .getEnclosingModule ( ) .getModule ( ) =
128132 this .getExpr ( ) .getEnclosingModule ( ) .getModule ( ) .getAnAncestor ( )
129133 }
@@ -321,7 +325,9 @@ module Filters {
321325
322326 string getFilterName ( ) { result = this .getConstantValue ( ) .getStringlikeValue ( ) }
323327
324- Callable getFilterCallable ( ) { result = call .getFilterCallable ( this .getFilterName ( ) ) }
328+ Callable getFilterCallable ( ) {
329+ result = call .getAFilterCallable ( ) and result .( MethodBase ) .getName ( ) = this .getFilterName ( )
330+ }
325331
326332 ActionControllerActionMethod getAnAction ( ) { result = call .getAnAction ( ) }
327333 }
You can’t perform that action at this time.
0 commit comments