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 {
179
179
}
180
180
}
181
181
182
+ bindingset [ local]
183
+ pragma [ inline_late]
184
+ private predicate isPairKey ( string local ) {
185
+ local = any ( Pair p ) .getKey ( ) .getConstantValue ( ) .getStringlikeValue ( )
186
+ }
187
+
182
188
/**
183
189
* A summary for accessing a local variable in an ERB template.
184
190
* This is the second half of the modeling of the flow from the `locals`
@@ -192,7 +198,7 @@ module Sinatra {
192
198
ErbLocalsAccessSummary ( ) {
193
199
this = "sinatra_erb_locals_access()" + global .getId ( ) + "#" + local and
194
200
local = any ( MethodCall c | c .getLocation ( ) .getFile ( ) = global .getErbFile ( ) ) .getMethodName ( ) and
195
- local = any ( Pair p ) . getKey ( ) . getConstantValue ( ) . getStringlikeValue ( )
201
+ isPairKey ( local )
196
202
}
197
203
198
204
override MethodCall getACall ( ) {
You can’t perform that action at this time.
0 commit comments