File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
lib/semmle/javascript/internal/flow_summaries
test/library-tests/TripleDot Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,11 @@ class Values extends SummarizedCallable {
157157class ToString extends SummarizedCallable {
158158 ToString ( ) { this = "Object#toString / Array#toString" }
159159
160- override DataFlow:: MethodCallNode getACallSimple ( ) { result .getMethodName ( ) = "toString" }
160+ override InstanceCall getACallSimple ( ) {
161+ result .( DataFlow:: MethodCallNode ) .getMethodName ( ) = "toString"
162+ or
163+ result = arrayConstructorRef ( ) .getAPropertyRead ( "prototype" ) .getAMemberCall ( "toString" )
164+ }
161165
162166 override predicate propagatesFlow ( string input , string output , boolean preservesValue ) {
163167 preservesValue = false and
Original file line number Diff line number Diff line change @@ -41,5 +41,5 @@ function implicitToString() {
4141 sink ( array . toString ( ) ) ; // $ hasTaintFlow=implicitToString.1 hasTaintFlow=implicitToString.2
4242 sink ( array . toString ( "utf8" ) ) ; // $ hasTaintFlow=implicitToString.1 hasTaintFlow=implicitToString.2
4343
44- sink ( Array . prototype . toString . call ( array ) ) ; // $ MISSING: hasTaintFlow=implicitToString.1 hasTaintFlow=implicitToString.2
44+ sink ( Array . prototype . toString . call ( array ) ) ; // $ hasTaintFlow=implicitToString.1 hasTaintFlow=implicitToString.2
4545}
You can’t perform that action at this time.
0 commit comments