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 {
153153
154154 /** The `$where` query operator executes a string as JavaScript. */
155155 private class WhereQueryOperator extends DataFlow:: Node , Decoding:: Range {
156- API:: Node dictionary ;
157156 DataFlow:: Node query ;
158157
159158 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+ )
164165 }
165166
166167 override DataFlow:: Node getAnInput ( ) { result = query }
You can’t perform that action at this time.
0 commit comments