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

branch
eric7
changeset 10883
1fe731ca7078
parent 10439
21c28b0f9e41
child 11090
f5f5f5803935
equal deleted inserted replaced
10882:4e6556be3907 10883:1fe731ca7078
283 283
284 if len(context.callArgs) and context.callFunctionNameQual in functionNames: 284 if len(context.callArgs) and context.callFunctionNameQual in functionNames:
285 node = context.node.args[0] 285 node = context.node.args[0]
286 286
287 # some calls take an arg list, check the first part 287 # some calls take an arg list, check the first part
288 if isinstance(node, ast.List): 288 if isinstance(node, ast.List) and node.elts:
289 node = node.elts[0] 289 node = node.elts[0]
290 290
291 # make sure the param is a string literal and not a var name 291 # make sure the param is a string literal and not a var name
292 if AstUtilities.isString(node) and not fullPathMatchRe.match(node.value): 292 if AstUtilities.isString(node) and not fullPathMatchRe.match(node.value):
293 reportError( 293 reportError(

eric ide

mercurial