JS: Move some alerts to their correct location

One of the diffs look confusing but:
Previously parameter {2,3} where flagged, now parameter {1,2} are flagged.

Note that for command injection, the SystemCommandExecution is flagged
despite the test file claiming otherwise.
This commit is contained in:
Asger F
2025-02-11 15:17:10 +01:00
parent f5911c9e5a
commit 86932c51bc
18 changed files with 103 additions and 103 deletions

View File

@@ -1,6 +1,6 @@
function countOccurrences(xs, p) { // $ Alert
function countOccurrences(xs, p) {
var count = 0;
for (let x of xs)
for (let x of xs) // $ Alert
if (p())
++count;
return count;