@@ -37,10 +37,10 @@ private module log {
3737
3838 override DataFlow:: Node getAnInput ( ) {
3939 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"
4141 or
4242 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" ) ) ]
4444 }
4545 }
4646
@@ -61,10 +61,10 @@ private module log {
6161
6262 override DataFlow:: Node getAnInput ( ) {
6363 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"
6565 or
6666 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" ) ) ]
6868 }
6969 }
7070
@@ -84,10 +84,10 @@ private module log {
8484
8585 override DataFlow:: Node getAnInput ( ) {
8686 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"
8888 or
8989 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" ) ) ]
9191 }
9292 }
9393
@@ -109,10 +109,10 @@ private module log {
109109
110110 override DataFlow:: Node getAnInput ( ) {
111111 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"
113113 or
114114 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" ) ) ]
116116 }
117117 }
118118}
0 commit comments