Apply suggestions from code review

Base type of EscapingSanitizer

Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
This commit is contained in:
Asger F
2020-05-18 09:31:09 +01:00
committed by GitHub
parent ffb22c061a
commit f52c827966

View File

@@ -74,10 +74,10 @@ private module MySql {
}
/** A call to the `escape` or `escapeId` method that performs SQL sanitization. */
class EscapingSanitizer extends SQL::SqlSanitizer, @callexpr {
class EscapingSanitizer extends SQL::SqlSanitizer, MethodCallExpr {
EscapingSanitizer() {
this = [mysql(), pool(), connection()].getAMemberCall(["escape", "escapeId"]).asExpr() and
input = this.(MethodCallExpr).getArgument(0) and
this = [mysql(), pool(), connection()].getAMethodCall(["escape", "escapeId"]).asExpr() and
input = this.getArgument(0) and
output = this
}
}