Update javascript/ql/src/semmle/javascript/frameworks/SQL.qll

Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
This commit is contained in:
Asger F
2020-05-18 13:23:22 +01:00
committed by GitHub
parent a18e0b37cf
commit a9983fdb49

View File

@@ -145,11 +145,9 @@ private module Postgres {
/** Gets a data flow node referring to a Postgres client. */
DataFlow::SourceNode client() { result = client(DataFlow::TypeTracker::end()) }
private DataFlow::SourceNode clientOrPool() { result = client() or result = pool() }
/** A call to the Postgres `query` method. */
private class QueryCall extends DatabaseAccess, DataFlow::MethodCallNode {
QueryCall() { this = clientOrPool().getAMethodCall("query") }
QueryCall() { this = [client(), pool()].getAMethodCall("query") }
override DataFlow::Node getAQueryArgument() { result = getArgument(0) }
}