Skip to content

Commit 89dd8a8

Browse files
committed
1 parent 06add01 commit 89dd8a8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

javascript/ql/lib/semmle/javascript/security/dataflow/IndirectCommandInjectionQuery.qll

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ module IndirectCommandInjectionConfig implements DataFlow::ConfigSig {
3030
predicate observeDiffInformedIncrementalMode() { any() }
3131

3232
Location getASelectedSinkLocation(DataFlow::Node sink) {
33-
exists(DataFlow::Node node |
34-
isSinkWithHighlight(sink, node) and
35-
result = node.getLocation()
33+
exists(DataFlow::Node highlight | result = highlight.getLocation() |
34+
if isSinkWithHighlight(sink, _)
35+
then isSinkWithHighlight(sink, highlight)
36+
else highlight = sink
3637
)
3738
}
3839
}

0 commit comments

Comments
 (0)