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:68:11:68:18 | source() | sanitizer-guards.js:75:8:75: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:68:11:68:18 | source() | sanitizer-guards.js:75:8:75: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 @@ -63,3 +63,14 @@ function phi() {
6363 }
6464 sink ( x ) ; // OK
6565}
66+
67+ function phi2 ( ) {
68+ let x = source ( ) ;
69+
70+ if ( something ( x ) || isSafe ( x ) ) {
71+ // this input to the phi node for 'x' is not fully sanitized
72+ } else {
73+ x = null ;
74+ }
75+ sink ( x ) ; // OK
76+ }
You can’t perform that action at this time.
0 commit comments