JS: Update TaintBarriers test

This commit is contained in:
Asger F
2019-11-22 12:09:46 +00:00
parent a6e75259d6
commit b407de01f8
4 changed files with 8 additions and 10 deletions

View File

@@ -1,7 +1,5 @@
| tst.js:5:9:5:19 | /x/.test(v) | ExampleConfiguration | false | tst.js:5:18:5:18 | v |
| tst.js:5:9:5:19 | /x/.test(v) | ExampleConfiguration | true | tst.js:5:18:5:18 | v |
| tst.js:11:9:11:20 | v.match(/x/) | ExampleConfiguration | false | tst.js:11:9:11:9 | v |
| tst.js:11:9:11:20 | v.match(/x/) | ExampleConfiguration | true | tst.js:11:9:11:9 | v |
| tst.js:5:9:5:21 | /^x$/.test(v) | ExampleConfiguration | true | tst.js:5:20:5:20 | v |
| tst.js:11:9:11:25 | v.match(/[^a-z]/) | ExampleConfiguration | false | tst.js:11:9:11:9 | v |
| tst.js:23:9:23:27 | o.hasOwnProperty(v) | ExampleConfiguration | true | tst.js:23:26:23:26 | v |
| tst.js:35:9:35:14 | v in o | ExampleConfiguration | true | tst.js:35:9:35:9 | v |
| tst.js:47:9:47:25 | o[v] == undefined | ExampleConfiguration | false | tst.js:47:11:47:11 | v |

View File

@@ -1,4 +1,6 @@
| tst.js:3:10:3:10 | v | tst.js:2:13:2:20 | SOURCE() |
| tst.js:8:14:8:14 | v | tst.js:2:13:2:20 | SOURCE() |
| tst.js:12:14:12:14 | v | tst.js:2:13:2:20 | SOURCE() |
| tst.js:21:10:21:10 | v | tst.js:20:13:20:20 | SOURCE() |
| tst.js:26:14:26:14 | v | tst.js:20:13:20:20 | SOURCE() |
| tst.js:33:10:33:10 | v | tst.js:32:13:32:20 | SOURCE() |

View File

@@ -1,6 +1,4 @@
| tst.js:6:14:6:14 | v | ExampleConfiguration |
| tst.js:8:14:8:14 | v | ExampleConfiguration |
| tst.js:12:14:12:14 | v | ExampleConfiguration |
| tst.js:14:14:14:14 | v | ExampleConfiguration |
| tst.js:24:14:24:14 | v | ExampleConfiguration |
| tst.js:36:14:36:14 | v | ExampleConfiguration |

View File

@@ -2,16 +2,16 @@ function SanitizingRegExpTest () {
var v = SOURCE();
SINK(v);
if (/x/.test(v)) {
SINK(v);
if (/^x$/.test(v)) {
SINK(v); // sanitized
} else {
SINK(v);
}
if (v.match(/x/)) {
if (v.match(/[^a-z]/)) {
SINK(v);
} else {
SINK(v);
SINK(v); // sanitized
}
}