mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
JS: Add: test cases for toWellFormed
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user