File tree Expand file tree Collapse file tree
python/ql/src/experimental/semmle/python/frameworks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,21 +101,6 @@ private module NoSql {
101101 }
102102 }
103103
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-
119104 /**
120105 * Gets a reference to a `Mongo` collection method call
121106 *
@@ -125,10 +110,12 @@ private module NoSql {
125110 * mongo.db.user.find({'name': safe_search})
126111 * ```
127112 *
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.
129114 */
130115 private class MongoCollectionCall extends DataFlow:: CallCfgNode , NoSqlQuery:: Range {
131- MongoCollectionCall ( ) { this = mongoCollectionMethod ( ) .getACall ( ) }
116+ MongoCollectionCall ( ) {
117+ this = mongoCollection ( ) .getMember ( any ( MongoCollectionMethodNames m ) ) .getACall ( )
118+ }
132119
133120 override DataFlow:: Node getQuery ( ) { result = this .getArg ( 0 ) }
134121 }
You can’t perform that action at this time.
0 commit comments