File tree Expand file tree Collapse file tree
ruby/ql/lib/codeql/ruby/frameworks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -308,6 +308,9 @@ private class LocalAssignsHashSyntheticGlobal extends SummaryComponent::Syntheti
308308
309309 /** Gets the identifier for this particular locals hash synthetic global. */
310310 string getId ( ) { result = id }
311+
312+ /** Gets a call to render that can write to this hash. */
313+ Rails:: RenderCall getARenderCall ( ) { result .getTemplateFile ( ) = erbFile }
311314}
312315
313316/** A summary for `render` calls linked to some specific ERB file. */
@@ -368,8 +371,8 @@ private class AccessLocalsKeySummary extends SummarizedCallable {
368371 this = "rails_locals_key()" + glob .getId ( ) + "#" + methodName and
369372 methodName = getAMethodNameFromErbFile ( glob .getErbFile ( ) )
370373 // 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)
373376 }
374377
375378 override MethodCall getACall ( ) {
You can’t perform that action at this time.
0 commit comments