@@ -37,10 +37,10 @@ private module log {
37
37
38
38
override DataFlow:: Node getAnInput ( ) {
39
39
this .getFunction ( ) .( DataFlow:: AttrRead ) .getAttributeName ( ) != "log" and
40
- result = this .getArg ( 0 )
40
+ result in [ this .getArg ( _ ) , this . getArgByName ( _ ) ] // this includes the arg named "msg"
41
41
or
42
42
this .getFunction ( ) .( DataFlow:: AttrRead ) .getAttributeName ( ) = "log" and
43
- result = this .getArg ( 1 )
43
+ result in [ this .getArg ( any ( int i | i > 0 ) ) , this . getArgByName ( any ( string s | s != "level" ) ) ]
44
44
}
45
45
}
46
46
@@ -61,10 +61,10 @@ private module log {
61
61
62
62
override DataFlow:: Node getAnInput ( ) {
63
63
this .getFunction ( ) .( DataFlow:: AttrRead ) .getAttributeName ( ) != "log" and
64
- result = this .getArg ( 0 )
64
+ result in [ this .getArg ( _ ) , this . getArgByName ( _ ) ] // this includes the arg named "msg"
65
65
or
66
66
this .getFunction ( ) .( DataFlow:: AttrRead ) .getAttributeName ( ) = "log" and
67
- result = this .getArg ( 1 )
67
+ result in [ this .getArg ( any ( int i | i > 0 ) ) , this . getArgByName ( any ( string s | s != "level" ) ) ]
68
68
}
69
69
}
70
70
@@ -84,10 +84,10 @@ private module log {
84
84
85
85
override DataFlow:: Node getAnInput ( ) {
86
86
this .getFunction ( ) .( DataFlow:: AttrRead ) .getAttributeName ( ) != "log" and
87
- result = this .getArg ( 0 )
87
+ result in [ this .getArg ( _ ) , this . getArgByName ( _ ) ] // this includes the arg named "msg"
88
88
or
89
89
this .getFunction ( ) .( DataFlow:: AttrRead ) .getAttributeName ( ) = "log" and
90
- result = this .getArg ( 1 )
90
+ result in [ this .getArg ( any ( int i | i > 0 ) ) , this . getArgByName ( any ( string s | s != "level" ) ) ]
91
91
}
92
92
}
93
93
@@ -109,10 +109,10 @@ private module log {
109
109
110
110
override DataFlow:: Node getAnInput ( ) {
111
111
this .getFunction ( ) .( DataFlow:: AttrRead ) .getAttributeName ( ) != "log" and
112
- result = this .getArg ( 0 )
112
+ result in [ this .getArg ( _ ) , this . getArgByName ( _ ) ] // this includes the arg named "msg"
113
113
or
114
114
this .getFunction ( ) .( DataFlow:: AttrRead ) .getAttributeName ( ) = "log" and
115
- result = this .getArg ( 1 )
115
+ result in [ this .getArg ( any ( int i | i > 0 ) ) , this . getArgByName ( any ( string s | s != "level" ) ) ]
116
116
}
117
117
}
118
118
}
0 commit comments