Skip to content

Commit

Permalink
Include changes from review
Browse files Browse the repository at this point in the history
  • Loading branch information
porcupineyhairs committed Oct 20, 2024
1 parent e2dd126 commit 7ef2d79
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions python/ql/lib/semmle/python/frameworks/Pycurl.qll
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,13 @@ module Pycurl {
override predicate disablesCertificateValidation(
DataFlow::Node disablingNode, DataFlow::Node argumentOrigin
) {
exists(API::CallNode c |
c = setopt().getACall() and
sslverifypeer().getAValueReachableFromSource() = c.getArg(0) and
(
exists(IntegerLiteral i | i.getValue() = 0 and c.getArg(1).asExpr() = i)
or
exists(BooleanLiteral b | b.booleanValue() = false)
)
|
disablingNode = c and argumentOrigin = c.getArg(1)
)
sslverifypeer().getAValueReachableFromSource() = this.getArg(0) and
(
exists(IntegerLiteral i | i.getValue() = 0 and this.getArg(1).asExpr() = i)
or
exists(BooleanLiteral b | b.booleanValue() = false and this.getArg(_).asExpr() = b)
) and
(disablingNode = this and argumentOrigin = this.getArg(1))
}
}
}
Expand Down

0 comments on commit 7ef2d79

Please sign in to comment.