File tree Expand file tree Collapse file tree
python/ql/src/experimental/semmle/python/frameworks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,15 +64,14 @@ private module Re {
6464 *
6565 * See https://docs.python.org/3/library/re.html#regular-expression-objects
6666 */
67- private class CompiledRegex extends DataFlow:: CallCfgNode , RegexExecution:: Range {
67+ private class CompiledRegex extends DataFlow:: MethodCallNode , RegexExecution:: Range {
6868 DataFlow:: Node regexNode ;
6969
7070 CompiledRegex ( ) {
71- exists ( DataFlow:: CallCfgNode patternCall , DataFlow:: AttrRead reMethod |
72- this .getFunction ( ) = reMethod and
71+ exists ( DataFlow:: MethodCallNode patternCall |
7372 patternCall = API:: moduleImport ( "re" ) .getMember ( "compile" ) .getACall ( ) and
74- patternCall .flowsTo ( reMethod . getObject ( ) ) and
75- reMethod . getAttributeName ( ) instanceof RegexExecutionMethods and
73+ patternCall .flowsTo ( this . getReceiver ( ) ) and
74+ this . getMethodName ( ) instanceof RegexExecutionMethods and
7675 regexNode = patternCall .getArg ( 0 )
7776 )
7877 }
You can’t perform that action at this time.
0 commit comments