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 {
1820
1820
/** Gets a reference to this class. */
1821
1821
private DataFlow:: TypeTrackingNode getARef ( DataFlow:: TypeTracker t ) {
1822
1822
t .start ( ) and
1823
- result .asExpr ( ) = this .getParent ( )
1823
+ result .asExpr ( ) . ( ClassExpr ) = this .getParent ( )
1824
1824
or
1825
1825
exists ( DataFlow:: TypeTracker t2 | result = this .getARef ( t2 ) .track ( t2 , t ) )
1826
1826
}
Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ module Flask {
188
188
189
189
FlaskViewClass ( ) {
190
190
this .getABase ( ) = Views:: View:: subclassRef ( ) .getAUse ( ) .asExpr ( ) and
191
- api_node .getAnImmediateUse ( ) .asExpr ( ) = this .getParent ( )
191
+ api_node .getAnImmediateUse ( ) .asExpr ( ) . ( ClassExpr ) = this .getParent ( )
192
192
}
193
193
194
194
/** Gets a function that could handle incoming requests, if any. */
@@ -213,7 +213,7 @@ module Flask {
213
213
class FlaskMethodViewClass extends FlaskViewClass {
214
214
FlaskMethodViewClass ( ) {
215
215
this .getABase ( ) = Views:: MethodView:: subclassRef ( ) .getAUse ( ) .asExpr ( ) and
216
- api_node .getAnImmediateUse ( ) .asExpr ( ) = this .getParent ( )
216
+ api_node .getAnImmediateUse ( ) .asExpr ( ) . ( ClassExpr ) = this .getParent ( )
217
217
}
218
218
219
219
override Function getARequestHandler ( ) {
@@ -294,7 +294,7 @@ module Flask {
294
294
override Function getARequestHandler ( ) {
295
295
exists ( DataFlow:: LocalSourceNode func_src |
296
296
func_src .flowsTo ( this .getViewArg ( ) ) and
297
- func_src .asExpr ( ) = result .getDefinition ( )
297
+ func_src .asExpr ( ) . ( CallableExpr ) = result .getDefinition ( )
298
298
)
299
299
or
300
300
exists ( FlaskViewClass vc |
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ private module Tornado {
102
102
/** Gets a reference to this class. */
103
103
private DataFlow:: TypeTrackingNode getARef ( DataFlow:: TypeTracker t ) {
104
104
t .start ( ) and
105
- result .asExpr ( ) = this .getParent ( )
105
+ result .asExpr ( ) . ( ClassExpr ) = this .getParent ( )
106
106
or
107
107
exists ( DataFlow:: TypeTracker t2 | result = this .getARef ( t2 ) .track ( t2 , t ) )
108
108
}
You can’t perform that action at this time.
0 commit comments