mirror of
https://github.com/github/codeql.git
synced 2026-02-28 04:43:42 +01:00
Update javascript/ql/src/LanguageFeatures/TemplateSyntaxInStringLiteral.ql
Co-Authored-By: Asger F <316427+asgerf@users.noreply.github.com>
This commit is contained in:
@@ -76,9 +76,8 @@ class CandidateStringLiteral extends StringLiteral {
|
||||
* ```
|
||||
*/
|
||||
predicate hasObjectProvidingTemplateVariables(CandidateStringLiteral lit) {
|
||||
exists(DataFlow::CallNode call, DataFlow::ObjectLiteralNode obj, DataFlow::Node stringArg |
|
||||
stringArg = [StringConcatenation::getRoot(lit.flow()), lit.flow()] and
|
||||
stringArg = call.getAnArgument() and
|
||||
exists(DataFlow::CallNode call, DataFlow::ObjectLiteralNode obj |
|
||||
call.getAnArgument() = [lit.flow(), StringConcatenation::getRoot(lit.flow())] and
|
||||
obj.flowsTo(call.getAnArgument()) and
|
||||
forex(string name | name = lit.getAReferencedVariable() | exists(obj.getAPropertyWrite(name)))
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user