File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
python/ql/lib/semmle/python/frameworks Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1820,7 +1820,7 @@ private module PrivateDjango {
18201820 /** Gets a reference to this class. */
18211821 private DataFlow:: TypeTrackingNode getARef ( DataFlow:: TypeTracker t ) {
18221822 t .start ( ) and
1823- result .asExpr ( ) = this .getParent ( )
1823+ result .asExpr ( ) . ( ClassExpr ) = this .getParent ( )
18241824 or
18251825 exists ( DataFlow:: TypeTracker t2 | result = this .getARef ( t2 ) .track ( t2 , t ) )
18261826 }
Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ module Flask {
188188
189189 FlaskViewClass ( ) {
190190 this .getABase ( ) = Views:: View:: subclassRef ( ) .getAUse ( ) .asExpr ( ) and
191- api_node .getAnImmediateUse ( ) .asExpr ( ) = this .getParent ( )
191+ api_node .getAnImmediateUse ( ) .asExpr ( ) . ( ClassExpr ) = this .getParent ( )
192192 }
193193
194194 /** Gets a function that could handle incoming requests, if any. */
@@ -213,7 +213,7 @@ module Flask {
213213 class FlaskMethodViewClass extends FlaskViewClass {
214214 FlaskMethodViewClass ( ) {
215215 this .getABase ( ) = Views:: MethodView:: subclassRef ( ) .getAUse ( ) .asExpr ( ) and
216- api_node .getAnImmediateUse ( ) .asExpr ( ) = this .getParent ( )
216+ api_node .getAnImmediateUse ( ) .asExpr ( ) . ( ClassExpr ) = this .getParent ( )
217217 }
218218
219219 override Function getARequestHandler ( ) {
@@ -294,7 +294,7 @@ module Flask {
294294 override Function getARequestHandler ( ) {
295295 exists ( DataFlow:: LocalSourceNode func_src |
296296 func_src .flowsTo ( this .getViewArg ( ) ) and
297- func_src .asExpr ( ) = result .getDefinition ( )
297+ func_src .asExpr ( ) . ( CallableExpr ) = result .getDefinition ( )
298298 )
299299 or
300300 exists ( FlaskViewClass vc |
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ private module Tornado {
102102 /** Gets a reference to this class. */
103103 private DataFlow:: TypeTrackingNode getARef ( DataFlow:: TypeTracker t ) {
104104 t .start ( ) and
105- result .asExpr ( ) = this .getParent ( )
105+ result .asExpr ( ) . ( ClassExpr ) = this .getParent ( )
106106 or
107107 exists ( DataFlow:: TypeTracker t2 | result = this .getARef ( t2 ) .track ( t2 , t ) )
108108 }
You can’t perform that action at this time.
0 commit comments