Skip to content

Commit 678bb7c

Browse files
committed
JS: simplify loop detection
1 parent 2d24684 commit 678bb7c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

javascript/ql/src/Security/CWE-116/IncompleteMultiCharacterSanitization.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,6 @@ where
7676
dangerous instanceof RegExpGroup
7777
) and
7878
// don't flag replace operations in a loop
79-
not replace.getReceiver() = replace.getASuccessor+()
79+
not replace.getReceiver().getALocalSource() = replace
8080
select replace, "The replaced string may still contain a substring that starts matching at $@.",
8181
dangerous, dangerous.toString()

0 commit comments

Comments
 (0)