src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/certificateValidation.py

branch
eric7
changeset 10507
d1c6608155ef
parent 10439
21c28b0f9e41
child 10517
aecd5a8c958c
equal deleted inserted replaced
10506:321555d0303b 10507:d1c6608155ef
41 @type SecurityContext 41 @type SecurityContext
42 @param config dictionary with configuration data 42 @param config dictionary with configuration data
43 @type dict 43 @type dict
44 """ 44 """
45 httpVerbs = ("get", "options", "head", "post", "put", "patch", "delete") 45 httpVerbs = ("get", "options", "head", "post", "put", "patch", "delete")
46 httpxAttrs = ("request", "stream", "Client", "AsyncClient") + httpVerbs
47 qualName = context.callFunctionNameQual.split(".")[0]
46 if ( 48 if (
47 "requests" in context.callFunctionNameQual 49 (
48 and context.callFunctionName in httpVerbs 50 (
51 qualName == "requests"
52 and context.callFunctionName in httpVerbs
53 )
54 or (
55 qualName == "httpx"
56 and context.callFunctionName in httpxAttrs
57 )
58 )
49 and context.checkCallArgValue("verify", "False") 59 and context.checkCallArgValue("verify", "False")
50 ): 60 ):
51 reportError( 61 reportError(
52 context.getLinenoForCallArg("verify") - 1, 62 context.getLinenoForCallArg("verify") - 1,
53 context.getOffsetForCallArg("verify"), 63 context.getOffsetForCallArg("verify"),

eric ide

mercurial