File tree Expand file tree Collapse file tree 1 file changed +4
-17
lines changed
python/ql/src/experimental/semmle/python/frameworks Expand file tree Collapse file tree 1 file changed +4
-17
lines changed Original file line number Diff line number Diff line change @@ -101,21 +101,6 @@ private module NoSql {
101
101
}
102
102
}
103
103
104
- /**
105
- * Gets a reference to a `Mongo` collection method.
106
- *
107
- * ```py
108
- * from flask_pymongo import PyMongo
109
- * mongo = PyMongo(app)
110
- * mongo.db.user.find({'name': safe_search})
111
- * ```
112
- *
113
- * `mongo.db.user.find` would be a collection method.
114
- */
115
- private API:: Node mongoCollectionMethod ( ) {
116
- result = mongoCollection ( ) .getMember ( any ( MongoCollectionMethodNames m ) )
117
- }
118
-
119
104
/**
120
105
* Gets a reference to a `Mongo` collection method call
121
106
*
@@ -125,10 +110,12 @@ private module NoSql {
125
110
* mongo.db.user.find({'name': safe_search})
126
111
* ```
127
112
*
128
- * `mongo.db.user.find({'name': safe_search})` would be a collection method call, and so the result .
113
+ * `mongo.db.user.find({'name': safe_search})` would be a collection method call.
129
114
*/
130
115
private class MongoCollectionCall extends DataFlow:: CallCfgNode , NoSqlQuery:: Range {
131
- MongoCollectionCall ( ) { this = mongoCollectionMethod ( ) .getACall ( ) }
116
+ MongoCollectionCall ( ) {
117
+ this = mongoCollection ( ) .getMember ( any ( MongoCollectionMethodNames m ) ) .getACall ( )
118
+ }
132
119
133
120
override DataFlow:: Node getQuery ( ) { result = this .getArg ( 0 ) }
134
121
}
You can’t perform that action at this time.
0 commit comments