Skip to content

Commit def8d75

Browse files
committed
Added test case for Array.prototype.toSorted, which is currently not flagged as a taint sink.
1 parent 7517ad3 commit def8d75

File tree

1 file changed

+4
-0
lines changed
  • javascript/ql/test/library-tests/TaintTracking

1 file changed

+4
-0
lines changed

javascript/ql/test/library-tests/TaintTracking/tst.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,8 @@ function test() {
5959
tagged`foo ${"safe"} bar ${x} baz`;
6060

6161
sink(x.reverse()); // NOT OK
62+
63+
sink(x.toSorted()) // NOT OK
64+
const xSorted = x.toSorted();
65+
sink(xSorted) // NOT OK
6266
}

0 commit comments

Comments
 (0)