JS: Added test case which is not flagged but should be abusing new RegExp with global flag

This commit is contained in:
Napalys
2024-11-26 09:18:51 +01:00
parent d6372aebc7
commit 41f21d429b

View File

@@ -327,4 +327,8 @@ function incompleteComplexSanitizers() {
if (str === "\"")
return """;
}) + '"';
}
}
function typicalBadHtmlSanitizers(s) {
s().replace(new RegExp("[<>]", "g"),''); // NOT OK -- should be not okay, but is not flagged
}