103 return (name in names, statement, strReplace) |
103 return (name in names, statement, strReplace) |
104 else: |
104 else: |
105 return (False, statement, strReplace) |
105 return (False, statement, strReplace) |
106 |
106 |
107 |
107 |
108 def checkHardcodedSqlExpressions(reportError, context, config): # noqa: U100 |
108 def checkHardcodedSqlExpressions(reportError, context, _config): |
109 """ |
109 """ |
110 Function to check for SQL injection. |
110 Function to check for SQL injection. |
111 |
111 |
112 @param reportError function to be used to report errors |
112 @param reportError function to be used to report errors |
113 @type func |
113 @type func |
114 @param context security context object |
114 @param context security context object |
115 @type SecurityContext |
115 @type SecurityContext |
116 @param config dictionary with configuration data |
116 @param _config dictionary with configuration data (unused) |
117 @type dict |
117 @type dict |
118 """ |
118 """ |
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( |