Skip to content

Commit 1243c73

Browse files
committed
use ConcatenationNode::isCoercion
1 parent 2dedfb3 commit 1243c73

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

javascript/ql/lib/semmle/javascript/security/dataflow/PrototypePollutingAssignmentQuery.qll

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@ class Configuration extends TaintTracking::Configuration {
3434
// Concatenating with a string will in practice prevent the string `__proto__` from arising.
3535
exists(StringOps::ConcatenationRoot root | node = root |
3636
// Exclude the string coercion `"" + node` from this filter.
37-
not (
38-
strictcount(root.getALeaf()) = 2 and
39-
root.getALeaf().getStringValue() = ""
40-
)
37+
not node.(StringOps::ConcatenationNode).isCoercion()
4138
)
4239
}
4340

0 commit comments

Comments
 (0)