Skip to content

Commit 0b4c85f

Browse files
committed
Python: Autoformat and fix broken module reference
1 parent 11c89ad commit 0b4c85f

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

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

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ private class FlaskClientSuppliedSecret extends ClientSuppliedSecret {
218218
private class DjangoClientSuppliedSecret extends ClientSuppliedSecret {
219219
DjangoClientSuppliedSecret() {
220220
this =
221-
PrivateDjango::DjangoImpl::Http::Request::HttpRequest::classRef()
221+
PrivateDjango::DjangoImpl::DjangoHttp::Request::HttpRequest::classRef()
222222
.getMember(["headers", "META"])
223223
.getMember("get")
224224
.getACall() and
@@ -316,36 +316,35 @@ class CompareSink extends DataFlow::Node {
316316
exists(Compare compare |
317317
(
318318
compare.getOp(0) instanceof Eq or
319-
compare.getOp(0) instanceof NotEq
319+
compare.getOp(0) instanceof NotEq
320320
) and
321321
(
322322
compare.getLeft() = this.asExpr() and
323-
not compare.getComparator(0).(StrConst).getText() = "bearer"
323+
not compare.getComparator(0).(StrConst).getText() = "bearer"
324324
or
325325
compare.getComparator(0) = this.asExpr() and
326-
not compare.getLeft().(StrConst).getText() = "bearer"
326+
not compare.getLeft().(StrConst).getText() = "bearer"
327327
)
328-
) or
329-
exists(Compare compare |
330-
(
331-
compare.getOp(0) instanceof IsNot
332-
) and
328+
)
329+
or
330+
exists(Compare compare |
331+
compare.getOp(0) instanceof IsNot and
333332
(
334333
compare.getLeft() = this.asExpr() and
335334
not compare.getComparator(0) instanceof None
336335
or
337336
compare.getComparator(0) = this.asExpr() and
338337
not compare.getLeft() instanceof None
339-
)
340-
)
338+
)
339+
)
341340
}
342-
343-
/**
344-
* Holds if there is a flow to len().
345-
*/
341+
342+
/**
343+
* Holds if there is a flow to len().
344+
*/
346345
predicate flowtolen() {
347346
exists(ExcludeLenFunc config, DataFlow2::PathNode source, DataFlow2::PathNode sink |
348-
config.hasFlowPath(source, sink)
347+
config.hasFlowPath(source, sink)
349348
)
350349
}
351350
}

0 commit comments

Comments
 (0)