File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed
javascript/ql/test/library-tests/TaintTracking Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ typeInferenceMismatch
7777| sanitizer-guards.js:13:14:13:21 | source() | sanitizer-guards.js:26:9:26:14 | this.x |
7878| sanitizer-guards.js:43:11:43:18 | source() | sanitizer-guards.js:45:8:45:8 | x |
7979| sanitizer-guards.js:43:11:43:18 | source() | sanitizer-guards.js:48:10:48:10 | x |
80+ | sanitizer-guards.js:57:11:57:18 | source() | sanitizer-guards.js:64:8:64:8 | x |
8081| spread.js:2:15:2:22 | source() | spread.js:4:8:4:19 | { ...taint } |
8182| spread.js:2:15:2:22 | source() | spread.js:5:8:5:43 | { f: 'h ... orld' } |
8283| spread.js:2:15:2:22 | source() | spread.js:7:8:7:19 | [ ...taint ] |
Original file line number Diff line number Diff line change 5353| sanitizer-guards.js:43:11:43:18 | source() | sanitizer-guards.js:45:8:45:8 | x |
5454| sanitizer-guards.js:43:11:43:18 | source() | sanitizer-guards.js:48:10:48:10 | x |
5555| sanitizer-guards.js:43:11:43:18 | source() | sanitizer-guards.js:52:10:52:10 | x |
56+ | sanitizer-guards.js:57:11:57:18 | source() | sanitizer-guards.js:64:8:64:8 | x |
5657| thisAssignments.js:4:17:4:24 | source() | thisAssignments.js:5:10:5:18 | obj.field |
5758| thisAssignments.js:7:19:7:26 | source() | thisAssignments.js:8:10:8:20 | this.field2 |
5859| tst.js:2:13:2:20 | source() | tst.js:4:10:4:10 | x |
Original file line number Diff line number Diff line change @@ -52,3 +52,14 @@ function reflective() {
5252 sink ( x ) ; // OK
5353 }
5454}
55+
56+ function phi ( ) {
57+ let x = source ( ) ;
58+
59+ if ( something ( x ) && isSafe ( x ) ) {
60+ // this input to the phi node for 'x' should be sanitized
61+ } else {
62+ x = null ;
63+ }
64+ sink ( x ) ; // OK
65+ }
You can’t perform that action at this time.
0 commit comments