JS: Add test case (with old expected data)

This commit is contained in:
Asger F
2024-02-14 10:44:50 +01:00
parent 9a08c27ad4
commit bafe5e3d8e
3 changed files with 10 additions and 0 deletions

View File

@@ -154,6 +154,8 @@ typeInferenceMismatch
| json-stringify.js:2:16:2:23 | source() | json-stringify.js:42:8:42:51 | JSON.st ... urce))) |
| json-stringify.js:2:16:2:23 | source() | json-stringify.js:45:8:45:23 | fastJson(source) |
| json-stringify.js:3:15:3:22 | source() | json-stringify.js:8:8:8:31 | jsonStr ... (taint) |
| logical-and.js:2:17:2:24 | source() | logical-and.js:4:10:4:24 | "safe" && taint |
| logical-and.js:2:17:2:24 | source() | logical-and.js:5:10:5:24 | taint && "safe" |
| nested-props.js:4:13:4:20 | source() | nested-props.js:5:10:5:14 | obj.x |
| nested-props.js:9:18:9:25 | source() | nested-props.js:10:10:10:16 | obj.x.y |
| nested-props.js:35:13:35:20 | source() | nested-props.js:36:10:36:20 | doLoad(obj) |

View File

@@ -73,6 +73,8 @@
| importedReactComponent.jsx:4:40:4:47 | source() | exportedReactComponent.jsx:2:10:2:19 | props.text |
| indexOf.js:4:11:4:18 | source() | indexOf.js:9:10:9:10 | x |
| indexOf.js:4:11:4:18 | source() | indexOf.js:13:10:13:10 | x |
| logical-and.js:2:17:2:24 | source() | logical-and.js:4:10:4:24 | "safe" && taint |
| logical-and.js:2:17:2:24 | source() | logical-and.js:5:10:5:24 | taint && "safe" |
| nested-props.js:4:13:4:20 | source() | nested-props.js:5:10:5:14 | obj.x |
| nested-props.js:9:18:9:25 | source() | nested-props.js:10:10:10:16 | obj.x.y |
| nested-props.js:35:13:35:20 | source() | nested-props.js:36:10:36:20 | doLoad(obj) |

View File

@@ -0,0 +1,6 @@
function test() {
var taint = source();
sink("safe" && taint); // NOT OK
sink(taint && "safe"); // OK
}