Skip to content

Commit a9983fd

Browse files
asgerferik-krogh
andauthored
Update javascript/ql/src/semmle/javascript/frameworks/SQL.qll
Co-authored-by: Erik Krogh Kristensen <[email protected]>
1 parent a18e0b3 commit a9983fd

File tree

1 file changed

+1
-3
lines changed
  • javascript/ql/src/semmle/javascript/frameworks

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,9 @@ private module Postgres {
145145
/** Gets a data flow node referring to a Postgres client. */
146146
DataFlow::SourceNode client() { result = client(DataFlow::TypeTracker::end()) }
147147

148-
private DataFlow::SourceNode clientOrPool() { result = client() or result = pool() }
149-
150148
/** A call to the Postgres `query` method. */
151149
private class QueryCall extends DatabaseAccess, DataFlow::MethodCallNode {
152-
QueryCall() { this = clientOrPool().getAMethodCall("query") }
150+
QueryCall() { this = [client(), pool()].getAMethodCall("query") }
153151

154152
override DataFlow::Node getAQueryArgument() { result = getArgument(0) }
155153
}

0 commit comments

Comments
 (0)