File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
python/ql/src/experimental/semmle/python/frameworks Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -64,15 +64,14 @@ private module Re {
64
64
*
65
65
* See https://docs.python.org/3/library/re.html#regular-expression-objects
66
66
*/
67
- private class CompiledRegex extends DataFlow:: CallCfgNode , RegexExecution:: Range {
67
+ private class CompiledRegex extends DataFlow:: MethodCallNode , RegexExecution:: Range {
68
68
DataFlow:: Node regexNode ;
69
69
70
70
CompiledRegex ( ) {
71
- exists ( DataFlow:: CallCfgNode patternCall , DataFlow:: AttrRead reMethod |
72
- this .getFunction ( ) = reMethod and
71
+ exists ( DataFlow:: MethodCallNode patternCall |
73
72
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
76
75
regexNode = patternCall .getArg ( 0 )
77
76
)
78
77
}
You can’t perform that action at this time.
0 commit comments