Skip to content

Commit b8ce5a6

Browse files
authored
Remove unncessary results
Simplifies query to improve performance by removing unnecessary results.
1 parent cd40de7 commit b8ce5a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

javascript/ql/src/experimental/Security/CWE-079/ClipboardXss.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import DataFlow::PathGraph
2323

2424
SourceNode clipboardDataTransferSource(TypeTracker t) {
2525
t.start() and
26-
exists(DataFlow::PropRead pr | pr.getPropertyName() = "clipboardData" and pr.flowsTo(result))
26+
exists(DataFlow::PropRead pr | pr.getPropertyName() = "clipboardData" and result = pr)
2727
or
2828
exists(TypeTracker t2 | result = clipboardDataTransferSource(t2).track(t2, t))
2929
}
@@ -39,7 +39,7 @@ SourceNode clipboardDataTransferSource() {
3939

4040
SourceNode clipboardDataSource(TypeTracker t) {
4141
t.start() and
42-
clipboardDataTransferSource().getAMethodCall("getData").flowsTo(result)
42+
result = clipboardDataTransferSource().getAMethodCall("getData")
4343
or
4444
exists(TypeTracker t2 | result = clipboardDataSource(t2).track(t2, t))
4545
}

0 commit comments

Comments
 (0)