Skip to content

Commit 005839b

Browse files
Update TimingAttack.qll
1 parent 01b865f commit 005839b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

python/ql/src/experimental/semmle/python/security/TimingAttack.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,12 @@ private predicate existsFailFastCheck(Expr firstInput, Expr secondInput) {
146146
) and
147147
(
148148
compare.getLeft() = firstInput and
149-
compare.getComparator(0) = secondInput
149+
compare.getComparator(0) = secondInput and
150+
not compare.getAComparator() instanceof None
150151
or
151152
compare.getLeft() = secondInput and
152-
compare.getComparator(0) = firstInput
153+
compare.getComparator(0) = firstInput and
154+
not compare.getAComparator() instanceof None
153155
)
154156
)
155157
}

0 commit comments

Comments
 (0)