JS: Add: test cases for toWellFormed

This commit is contained in:
Napalys
2024-11-20 17:36:43 +01:00
parent 596cfcfb42
commit 09f73d8d6f

View File

@@ -0,0 +1,12 @@
function test() {
let x = source();
sink(x.toWellFormed()); // NOT OK -- Currently not tainted, but should be
const wellFormedX = x.toWellFormed();
sink(wellFormedX); // NOT OK -- Currently not tainted, but should be
const concatWellFormedX = "/" + wellFormedX + "!";
sink(concatWellFormedX); // NOT OK -- Currently not tainted, but should be
sink(source().toWellFormed()); // NOT OK -- Currently not tainted, but should be
}