eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/certificateValidation.py

changeset 8222
5994b80b8760
parent 7923
91e843545d9a
equal deleted inserted replaced
8221:0572a215bd2f 8222:5994b80b8760
43 @type dict 43 @type dict
44 """ 44 """
45 http_verbs = ('get', 'options', 'head', 'post', 'put', 'patch', 'delete') 45 http_verbs = ('get', 'options', 'head', 'post', 'put', 'patch', 'delete')
46 if ( 46 if (
47 'requests' in context.callFunctionNameQual and 47 'requests' in context.callFunctionNameQual and
48 context.callFunctionName in http_verbs 48 context.callFunctionName in http_verbs and
49 context.checkCallArgValue('verify', 'False')
49 ): 50 ):
50 if context.checkCallArgValue('verify', 'False'): 51 reportError(
51 reportError( 52 context.getLinenoForCallArg('verify') - 1,
52 context.getLinenoForCallArg('verify') - 1, 53 context.getOffsetForCallArg('verify'),
53 context.getOffsetForCallArg('verify'), 54 "S501",
54 "S501", 55 "H",
55 "H", 56 "H"
56 "H" 57 )
57 )

eric ide

mercurial