File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
python/ql/lib/semmle/python/frameworks Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -153,14 +153,15 @@ private module PyMongo {
153
153
154
154
/** The `$where` query operator executes a string as JavaScript. */
155
155
private class WhereQueryOperator extends DataFlow:: Node , Decoding:: Range {
156
- API:: Node dictionary ;
157
156
DataFlow:: Node query ;
158
157
159
158
WhereQueryOperator ( ) {
160
- dictionary =
161
- mongoCollection ( ) .getMember ( mongoCollectionMethodName ( ) ) .getACall ( ) .getParameter ( 0 ) and
162
- query = dictionary .getSubscript ( "$where" ) .asSink ( ) and
163
- this = dictionary .getAValueReachingSink ( )
159
+ exists ( API:: Node dictionary |
160
+ dictionary =
161
+ mongoCollection ( ) .getMember ( mongoCollectionMethodName ( ) ) .getACall ( ) .getParameter ( 0 ) and
162
+ query = dictionary .getSubscript ( "$where" ) .asSink ( ) and
163
+ this = dictionary .getAValueReachingSink ( )
164
+ )
164
165
}
165
166
166
167
override DataFlow:: Node getAnInput ( ) { result = query }
You can’t perform that action at this time.
0 commit comments