File tree Expand file tree Collapse file tree
python/ql/lib/semmle/python/regexp/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ private import semmle.python.dataflow.new.DataFlow
1515private import semmle.python.Concepts as Concepts
1616
1717/** Gets a constant string value that may be used as a regular expression. */
18- DataFlow:: Node strStart ( ) { result .asExpr ( ) instanceof StrConst }
18+ DataFlow:: LocalSourceNode strStart ( ) { result .asExpr ( ) instanceof StrConst }
1919
2020private import semmle.python.regex as Regex
2121
@@ -44,7 +44,7 @@ private DataFlow::TypeTrackingNode backwards(DataFlow::TypeBackTracker t) {
4444private DataFlow:: TypeTrackingNode forwards ( DataFlow:: TypeTracker t ) {
4545 t .start ( ) and
4646 result = backwards ( DataFlow:: TypeBackTracker:: end ( ) ) and
47- result . flowsTo ( strStart ( ) )
47+ result = strStart ( )
4848 or
4949 exists ( DataFlow:: TypeTracker t2 | result = forwards ( t2 ) .track ( t2 , t ) ) and
5050 result = backwards ( _)
@@ -57,11 +57,11 @@ private DataFlow::TypeTrackingNode forwards(DataFlow::TypeTracker t) {
5757 * The result of the exploratory phase is used to limit the size of the search space in this precise analysis.
5858 */
5959private DataFlow:: TypeTrackingNode regexTracking ( DataFlow:: Node start , DataFlow:: TypeTracker t ) {
60- result = forwards ( _ ) and
60+ result = forwards ( t ) and
6161 (
6262 t .start ( ) and
6363 start = strStart ( ) and
64- result = start . getALocalSource ( )
64+ result = start
6565 or
6666 exists ( DataFlow:: TypeTracker t2 | result = regexTracking ( start , t2 ) .track ( t2 , t ) )
6767 )
You can’t perform that action at this time.
0 commit comments