File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
ruby/ql/lib/codeql/ruby/frameworks Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -308,6 +308,9 @@ private class LocalAssignsHashSyntheticGlobal extends SummaryComponent::Syntheti
308
308
309
309
/** Gets the identifier for this particular locals hash synthetic global. */
310
310
string getId ( ) { result = id }
311
+
312
+ /** Gets a call to render that can write to this hash. */
313
+ Rails:: RenderCall getARenderCall ( ) { result .getTemplateFile ( ) = erbFile }
311
314
}
312
315
313
316
/** A summary for `render` calls linked to some specific ERB file. */
@@ -368,8 +371,8 @@ private class AccessLocalsKeySummary extends SummarizedCallable {
368
371
this = "rails_locals_key()" + glob .getId ( ) + "#" + methodName and
369
372
methodName = getAMethodNameFromErbFile ( glob .getErbFile ( ) )
370
373
// TODO: this would cut down massively on impossible flow steps, but fails due to non-monotonic recusrion problems
371
- // and
372
- // renderHasLocalsKey(any(Rails::RenderCall c | c.getTemplateFile() = erbFile) , methodName) )
374
+ // and
375
+ // renderHasLocalsKey(glob.getARenderCall() , methodName)
373
376
}
374
377
375
378
override MethodCall getACall ( ) {
You can’t perform that action at this time.
0 commit comments