File tree Expand file tree Collapse file tree 4 files changed +5
-7
lines changed
python/ql/src/semmle/python Expand file tree Collapse file tree 4 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -345,7 +345,7 @@ module HTTP {
345
345
/** Gets the URL pattern for this route, if it can be statically determined. */
346
346
string getUrlPattern ( ) {
347
347
exists ( StrConst str |
348
- DataFlow :: exprNode ( str ) . ( DataFlow:: LocalSourceNode ) . flowsTo ( this . getUrlPatternArg ( ) ) and
348
+ this . getUrlPatternArg ( ) . getALocalSource ( ) = DataFlow:: exprNode ( str ) and
349
349
result = str .getText ( )
350
350
)
351
351
}
@@ -478,9 +478,7 @@ module HTTP {
478
478
/** Gets the mimetype of this HTTP response, if it can be statically determined. */
479
479
string getMimetype ( ) {
480
480
exists ( StrConst str |
481
- DataFlow:: exprNode ( str )
482
- .( DataFlow:: LocalSourceNode )
483
- .flowsTo ( this .getMimetypeOrContentTypeArg ( ) ) and
481
+ this .getMimetypeOrContentTypeArg ( ) .getALocalSource ( ) = DataFlow:: exprNode ( str ) and
484
482
result = str .getText ( ) .splitAt ( ";" , 0 )
485
483
)
486
484
or
Original file line number Diff line number Diff line change @@ -1708,7 +1708,7 @@ private module PrivateDjango {
1708
1708
1709
1709
DjangoRouteRegex ( ) {
1710
1710
this instanceof StrConst and
1711
- DataFlow :: exprNode ( this ) . ( DataFlow:: LocalSourceNode ) . flowsTo ( rePathCall . getUrlPatternArg ( ) )
1711
+ rePathCall . getUrlPatternArg ( ) . getALocalSource ( ) = DataFlow:: exprNode ( this )
1712
1712
}
1713
1713
1714
1714
DjangoRegexRouteSetup getRouteSetup ( ) { result = rePathCall }
Original file line number Diff line number Diff line change @@ -1097,7 +1097,7 @@ private DataFlow::CallCfgNode hashlibNewCall(string algorithmName) {
1097
1097
result = API:: moduleImport ( "hashlib" ) .getMember ( "new" ) .getACall ( ) and
1098
1098
nameArg in [ result .getArg ( 0 ) , result .getArgByName ( "name" ) ] and
1099
1099
exists ( StrConst str |
1100
- DataFlow :: exprNode ( str ) . ( DataFlow:: LocalSourceNode ) . flowsTo ( nameArg ) and
1100
+ nameArg . getALocalSource ( ) = DataFlow:: exprNode ( str ) and
1101
1101
algorithmName = str .getText ( )
1102
1102
)
1103
1103
)
Original file line number Diff line number Diff line change @@ -349,7 +349,7 @@ private module Tornado {
349
349
350
350
TornadoRouteRegex ( ) {
351
351
this instanceof StrConst and
352
- DataFlow :: exprNode ( this ) . ( DataFlow:: LocalSourceNode ) . flowsTo ( setup . getUrlPatternArg ( ) )
352
+ setup . getUrlPatternArg ( ) . getALocalSource ( ) = DataFlow:: exprNode ( this )
353
353
}
354
354
355
355
TornadoRouteSetup getRouteSetup ( ) { result = setup }
You can’t perform that action at this time.
0 commit comments