Skip to content

Commit 5898b48

Browse files
committed
add missing polarity check
1 parent 1db5cb1 commit 5898b48

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

javascript/ql/src/semmle/javascript/StandardLibrary.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ class StringReplaceCall extends DataFlow::MethodCallNode {
155155
DataFlow::Node ret
156156
|
157157
replacer = getCallback(1) and
158+
guard.getOutcome() = test.getPolarity() and
158159
guard.getTest() = test and
159160
replacer.getParameter(0).flowsToExpr(test.getAnOperand()) and
160161
test.getAnOperand().getStringValue() = old and

0 commit comments

Comments
 (0)