From 7ef2d79b3f50e638a4188e3853b4e8ffb2978cdf Mon Sep 17 00:00:00 2001 From: Porcupiney Hairs Date: Mon, 21 Oct 2024 03:28:19 +0530 Subject: [PATCH] Include changes from review --- .../ql/lib/semmle/python/frameworks/Pycurl.qll | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/python/ql/lib/semmle/python/frameworks/Pycurl.qll b/python/ql/lib/semmle/python/frameworks/Pycurl.qll index e5792976e817..fe052b2caae6 100644 --- a/python/ql/lib/semmle/python/frameworks/Pycurl.qll +++ b/python/ql/lib/semmle/python/frameworks/Pycurl.qll @@ -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)) } } }