File tree Expand file tree Collapse file tree 5 files changed +14
-12
lines changed
python/ql/lib/semmle/python Expand file tree Collapse file tree 5 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -225,9 +225,9 @@ class ModuleVariable extends SsaSourceVariable {
225
225
}
226
226
227
227
override ControlFlowNode getAnImplicitUse ( ) {
228
- result = global_variable_callnode ( )
228
+ result = this . global_variable_callnode ( )
229
229
or
230
- result = global_variable_import ( )
230
+ result = this . global_variable_import ( )
231
231
or
232
232
exists ( ImportTimeScope scope | scope .entryEdge ( result , _) |
233
233
this = scope .getOuterVariable ( _) or
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class EssaVariable extends TEssaDefinition {
41
41
*/
42
42
ControlFlowNode getASourceUse ( ) {
43
43
exists ( SsaSourceVariable var |
44
- result = use_for_var ( var ) and
44
+ result = this . use_for_var ( var ) and
45
45
result = var .getASourceUse ( )
46
46
)
47
47
}
@@ -258,7 +258,7 @@ class PhiFunction extends EssaDefinition, TPhiFunction {
258
258
/** Gets another definition of the same source variable that reaches this definition. */
259
259
private EssaDefinition reachingDefinition ( BasicBlock pred ) {
260
260
result .getScope ( ) = this .getScope ( ) and
261
- result .getSourceVariable ( ) = pred_var ( pred ) and
261
+ result .getSourceVariable ( ) = this . pred_var ( pred ) and
262
262
result .reachesEndOfBlock ( pred )
263
263
}
264
264
Original file line number Diff line number Diff line change @@ -1844,11 +1844,13 @@ private module PrivateDjango {
1844
1844
t .start ( ) and
1845
1845
result .asCfgNode ( ) .( CallNode ) .getFunction ( ) = this .asViewRef ( ) .asCfgNode ( )
1846
1846
or
1847
- exists ( DataFlow:: TypeTracker t2 | result = asViewResult ( t2 ) .track ( t2 , t ) )
1847
+ exists ( DataFlow:: TypeTracker t2 | result = this . asViewResult ( t2 ) .track ( t2 , t ) )
1848
1848
}
1849
1849
1850
1850
/** Gets a reference to the result of calling the `as_view` classmethod of this class. */
1851
- DataFlow:: Node asViewResult ( ) { asViewResult ( DataFlow:: TypeTracker:: end ( ) ) .flowsTo ( result ) }
1851
+ DataFlow:: Node asViewResult ( ) {
1852
+ this .asViewResult ( DataFlow:: TypeTracker:: end ( ) ) .flowsTo ( result )
1853
+ }
1852
1854
}
1853
1855
1854
1856
/** A class that we consider a django View class. */
@@ -1944,10 +1946,10 @@ private module PrivateDjango {
1944
1946
abstract DataFlow:: Node getViewArg ( ) ;
1945
1947
1946
1948
final override DjangoRouteHandler getARequestHandler ( ) {
1947
- poorMansFunctionTracker ( result ) = getViewArg ( )
1949
+ poorMansFunctionTracker ( result ) = this . getViewArg ( )
1948
1950
or
1949
1951
exists ( DjangoViewClass vc |
1950
- getViewArg ( ) = vc .asViewResult ( ) and
1952
+ this . getViewArg ( ) = vc .asViewResult ( ) and
1951
1953
result = vc .getARequestHandler ( )
1952
1954
)
1953
1955
}
Original file line number Diff line number Diff line change @@ -292,12 +292,12 @@ module Flask {
292
292
293
293
override Function getARequestHandler ( ) {
294
294
exists ( DataFlow:: LocalSourceNode func_src |
295
- func_src .flowsTo ( getViewArg ( ) ) and
295
+ func_src .flowsTo ( this . getViewArg ( ) ) and
296
296
func_src .asExpr ( ) .( CallableExpr ) = result .getDefinition ( )
297
297
)
298
298
or
299
299
exists ( FlaskViewClass vc |
300
- getViewArg ( ) = vc .asViewResult ( ) .getAUse ( ) and
300
+ this . getViewArg ( ) = vc .asViewResult ( ) .getAUse ( ) and
301
301
result = vc .getARequestHandler ( )
302
302
)
303
303
}
Original file line number Diff line number Diff line change @@ -397,8 +397,8 @@ private module StdlibPrivate {
397
397
result = this .get_executable_arg ( )
398
398
or
399
399
exists ( DataFlow:: Node arg_args , boolean shell |
400
- arg_args = get_args_arg ( ) and
401
- shell = get_shell_arg_value ( )
400
+ arg_args = this . get_args_arg ( ) and
401
+ shell = this . get_shell_arg_value ( )
402
402
|
403
403
// When "executable" argument is set, and "shell" argument is `False`, the
404
404
// "args" argument will only be used to set the program name and arguments to
You can’t perform that action at this time.
0 commit comments