File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
ruby/ql/lib/codeql/ruby/frameworks Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,12 @@ module Sinatra {
179179 }
180180 }
181181
182+ bindingset [ local]
183+ pragma [ inline_late]
184+ private predicate isPairKey ( string local ) {
185+ local = any ( Pair p ) .getKey ( ) .getConstantValue ( ) .getStringlikeValue ( )
186+ }
187+
182188 /**
183189 * A summary for accessing a local variable in an ERB template.
184190 * This is the second half of the modeling of the flow from the `locals`
@@ -192,7 +198,7 @@ module Sinatra {
192198 ErbLocalsAccessSummary ( ) {
193199 this = "sinatra_erb_locals_access()" + global .getId ( ) + "#" + local and
194200 local = any ( MethodCall c | c .getLocation ( ) .getFile ( ) = global .getErbFile ( ) ) .getMethodName ( ) and
195- local = any ( Pair p ) . getKey ( ) . getConstantValue ( ) . getStringlikeValue ( )
201+ isPairKey ( local )
196202 }
197203
198204 override MethodCall getACall ( ) {
You can’t perform that action at this time.
0 commit comments