mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
JS: Fix flow for nested destructurings
This commit is contained in:
@@ -22,6 +22,9 @@
|
||||
| constructor-calls.js:10:16:10:23 | source() | constructor-calls.js:30:8:30:19 | d_safe.taint |
|
||||
| constructor-calls.js:14:15:14:22 | source() | constructor-calls.js:17:8:17:14 | c.param |
|
||||
| constructor-calls.js:14:15:14:22 | source() | constructor-calls.js:25:8:25:14 | d.param |
|
||||
| destruct.js:15:7:15:14 | source() | destruct.js:5:10:5:10 | z |
|
||||
| destruct.js:15:7:15:14 | source() | destruct.js:8:10:8:10 | w |
|
||||
| destruct.js:15:7:15:14 | source() | destruct.js:11:10:11:10 | q |
|
||||
| exceptions.js:3:15:3:22 | source() | exceptions.js:5:10:5:10 | e |
|
||||
| exceptions.js:21:17:21:24 | source() | exceptions.js:23:10:23:10 | e |
|
||||
| exceptions.js:21:17:21:24 | source() | exceptions.js:24:10:24:21 | e.toString() |
|
||||
|
||||
18
javascript/ql/test/library-tests/TaintTracking/destruct.js
Normal file
18
javascript/ql/test/library-tests/TaintTracking/destruct.js
Normal file
@@ -0,0 +1,18 @@
|
||||
function test() {
|
||||
|
||||
function f(obj) {
|
||||
let { x: { y: { z } } } = obj;
|
||||
sink(z); // NOT OK
|
||||
|
||||
let [[[w]]] = obj;
|
||||
sink(w); // NOT OK
|
||||
|
||||
let { x: [ { y: q } ] } = obj;
|
||||
sink(q); // NOT OK
|
||||
}
|
||||
|
||||
function g() {
|
||||
f(source());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user