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

branch
eric7
changeset 11147
dee6e106b4d3
parent 11090
f5f5f5803935
equal deleted inserted replaced
11146:59e04f7003e9 11147:dee6e106b4d3
29 list of codes 29 list of codes
30 @rtype dict 30 @rtype dict
31 """ 31 """
32 return { 32 return {
33 "Str": [ 33 "Str": [
34 (checkHardcodedSqlExpressions, ("S608",)), 34 (checkHardcodedSqlExpressions, ("S-608",)),
35 ], 35 ],
36 } 36 }
37 37
38 38
39 SIMPLE_SQL_RE = re.compile( 39 SIMPLE_SQL_RE = re.compile(
119 executeCall, statement, strReplace = _evaluateAst(context.node) 119 executeCall, statement, strReplace = _evaluateAst(context.node)
120 if _checkString(statement): 120 if _checkString(statement):
121 reportError( 121 reportError(
122 context.node.lineno - 1, 122 context.node.lineno - 1,
123 context.node.col_offset, 123 context.node.col_offset,
124 "S608", 124 "S-608",
125 "M", 125 "M",
126 "M" if executeCall and not strReplace else "L", 126 "M" if executeCall and not strReplace else "L",
127 ) 127 )

eric ide

mercurial