@@ -32,7 +32,6 @@ private module Tornado {
32
32
33
33
/** Provides models for the `tornado.web` module */
34
34
module web {
35
-
36
35
/**
37
36
* Provides models for the `tornado.web.RequestHandler` class and subclasses.
38
37
*
@@ -75,7 +74,7 @@ private module Tornado {
75
74
*
76
75
* Use the predicate `RequestHandler::instance()` to get references to instances of the `tornado.web.RequestHandler` class or any subclass.
77
76
*/
78
- abstract class InstanceSource extends DataFlow:: Node { }
77
+ abstract class InstanceSource extends DataFlow:: LocalSourceNode { }
79
78
80
79
/** The `self` parameter in a method on the `tornado.web.RequestHandler` class or any subclass. */
81
80
private class SelfParam extends InstanceSource , RemoteFlowSource:: Range ,
@@ -120,7 +119,9 @@ private module Tornado {
120
119
}
121
120
122
121
/** Gets a reference to one of the methods `get_arguments`, `get_body_arguments`, `get_query_arguments`. */
123
- DataFlow:: Node argumentsMethod ( ) { result = argumentsMethod ( DataFlow:: TypeTracker:: end ( ) ) }
122
+ DataFlow:: Node argumentsMethod ( ) {
123
+ argumentsMethod ( DataFlow:: TypeTracker:: end ( ) ) .flowsTo ( result )
124
+ }
124
125
125
126
/** Gets a reference the `redirect` method. */
126
127
private DataFlow:: LocalSourceNode redirectMethod ( DataFlow:: TypeTracker t ) {
@@ -198,12 +199,10 @@ private module Tornado {
198
199
*
199
200
* Use the predicate `Application::instance()` to get references to instances of `tornado.web.Application`.
200
201
*/
201
- abstract class InstanceSource extends DataFlow:: Node { }
202
+ abstract class InstanceSource extends DataFlow:: LocalSourceNode { }
202
203
203
204
/** A direct instantiation of `tornado.web.Application`. */
204
- class ClassInstantiation extends InstanceSource , DataFlow:: CfgNode {
205
- override CallNode node ;
206
-
205
+ class ClassInstantiation extends InstanceSource , DataFlow:: CallCfgNode {
207
206
ClassInstantiation ( ) { this = classRef ( ) .getACall ( ) }
208
207
}
209
208
@@ -239,7 +238,6 @@ private module Tornado {
239
238
240
239
/** Provides models for the `tornado.httputil` module */
241
240
module httputil {
242
-
243
241
/**
244
242
* Provides models for the `tornado.httputil.HttpServerRequest` class
245
243
*
@@ -258,12 +256,10 @@ private module Tornado {
258
256
*
259
257
* Use the predicate `HttpServerRequest::instance()` to get references to instances of `tornado.httputil.HttpServerRequest`.
260
258
*/
261
- abstract class InstanceSource extends DataFlow:: Node { }
259
+ abstract class InstanceSource extends DataFlow:: LocalSourceNode { }
262
260
263
261
/** A direct instantiation of `tornado.httputil.HttpServerRequest`. */
264
- private class ClassInstantiation extends InstanceSource , DataFlow:: CfgNode {
265
- override CallNode node ;
266
-
262
+ private class ClassInstantiation extends InstanceSource , DataFlow:: CallCfgNode {
267
263
ClassInstantiation ( ) { this = classRef ( ) .getACall ( ) }
268
264
}
269
265
@@ -277,7 +273,6 @@ private module Tornado {
277
273
278
274
/** Gets a reference to an instance of `tornado.httputil.HttpServerRequest`. */
279
275
DataFlow:: Node instance ( ) { instance ( DataFlow:: TypeTracker:: end ( ) ) .flowsTo ( result ) }
280
-
281
276
282
277
/** Gets a reference to the `full_url` method. */
283
278
private DataFlow:: LocalSourceNode full_url ( DataFlow:: TypeTracker t ) {
@@ -430,11 +425,9 @@ private module Tornado {
430
425
* See https://www.tornadoweb.org/en/stable/web.html?highlight=write#tornado.web.RequestHandler.redirect
431
426
*/
432
427
private class TornadoRequestHandlerRedirectCall extends HTTP:: Server:: HttpRedirectResponse:: Range ,
433
- DataFlow:: CfgNode {
434
- override CallNode node ;
435
-
428
+ DataFlow:: CallCfgNode {
436
429
TornadoRequestHandlerRedirectCall ( ) {
437
- node .getFunction ( ) = tornado:: web:: RequestHandler:: redirectMethod ( ) . asCfgNode ( )
430
+ this .getFunction ( ) = tornado:: web:: RequestHandler:: redirectMethod ( )
438
431
}
439
432
440
433
override DataFlow:: Node getRedirectLocation ( ) {
@@ -454,11 +447,9 @@ private module Tornado {
454
447
* See https://www.tornadoweb.org/en/stable/web.html?highlight=write#tornado.web.RequestHandler.write
455
448
*/
456
449
private class TornadoRequestHandlerWriteCall extends HTTP:: Server:: HttpResponse:: Range ,
457
- DataFlow:: CfgNode {
458
- override CallNode node ;
459
-
450
+ DataFlow:: CallCfgNode {
460
451
TornadoRequestHandlerWriteCall ( ) {
461
- node .getFunction ( ) = tornado:: web:: RequestHandler:: writeMethod ( ) . asCfgNode ( )
452
+ this .getFunction ( ) = tornado:: web:: RequestHandler:: writeMethod ( )
462
453
}
463
454
464
455
override DataFlow:: Node getBody ( ) {
0 commit comments