Skip to content

Commit 7ef2d79

Browse files
author
Porcupiney Hairs
committed
Include changes from review
1 parent e2dd126 commit 7ef2d79

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

python/ql/lib/semmle/python/frameworks/Pycurl.qll

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,13 @@ module Pycurl {
9090
override predicate disablesCertificateValidation(
9191
DataFlow::Node disablingNode, DataFlow::Node argumentOrigin
9292
) {
93-
exists(API::CallNode c |
94-
c = setopt().getACall() and
95-
sslverifypeer().getAValueReachableFromSource() = c.getArg(0) and
96-
(
97-
exists(IntegerLiteral i | i.getValue() = 0 and c.getArg(1).asExpr() = i)
98-
or
99-
exists(BooleanLiteral b | b.booleanValue() = false)
100-
)
101-
|
102-
disablingNode = c and argumentOrigin = c.getArg(1)
103-
)
93+
sslverifypeer().getAValueReachableFromSource() = this.getArg(0) and
94+
(
95+
exists(IntegerLiteral i | i.getValue() = 0 and this.getArg(1).asExpr() = i)
96+
or
97+
exists(BooleanLiteral b | b.booleanValue() = false and this.getArg(_).asExpr() = b)
98+
) and
99+
(disablingNode = this and argumentOrigin = this.getArg(1))
104100
}
105101
}
106102
}

0 commit comments

Comments
 (0)