Skip to content

Commit 93dd9d0

Browse files
boveusalexrford
andauthored
Update ruby/ql/src/experimental/cwe-208/UnsafeHmacComparison.ql
Co-authored-by: Alex Ford <[email protected]>
1 parent f241498 commit 93dd9d0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ruby/ql/src/experimental/cwe-208/UnsafeHmacComparison.ql

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,7 @@ class Configuration extends DataFlow::Configuration {
5454

5555
// Holds if a given sink is an Equality Operation (== or !=)
5656
override predicate isSink(DataFlow::Node sink) {
57-
exists(EqualityOperation eqOp |
58-
eqOp.getLeftOperand() = sink.asExpr().getExpr()
59-
or
60-
eqOp.getRightOperand() = sink.asExpr().getExpr()
61-
)
57+
any(EqualityOperation eqOp).getAnOperand() = sink.asExpr().getExpr()
6258
}
6359
}
6460

0 commit comments

Comments
 (0)