JS: Now BadHtmlSanitizers new RegExp with unknown flags is also flagged.

This commit is contained in:
Napalys
2024-11-26 09:37:57 +01:00
parent 89f3b6f8d3
commit 18c7b18f82
4 changed files with 13 additions and 2 deletions

View File

@@ -68,3 +68,6 @@
| tst.js:333:2:333:40 | s().rep ... g"),'') | This HTML sanitizer does not sanitize ampersands |
| tst.js:333:2:333:40 | s().rep ... g"),'') | This HTML sanitizer does not sanitize double quotes |
| tst.js:333:2:333:40 | s().rep ... g"),'') | This HTML sanitizer does not sanitize single quotes |
| tst.js:337:2:337:46 | s().rep ... ()),'') | This HTML sanitizer does not sanitize ampersands |
| tst.js:337:2:337:46 | s().rep ... ()),'') | This HTML sanitizer does not sanitize double quotes |
| tst.js:337:2:337:46 | s().rep ... ()),'') | This HTML sanitizer does not sanitize single quotes |

View File

@@ -334,5 +334,5 @@ function typicalBadHtmlSanitizers(s) {
}
function typicalBadHtmlSanitizers(s) {
s().replace(new RegExp("[<>]", unknown()),''); // NOT OK -- should be flagged, because it is st ill a bad sanitizer
s().replace(new RegExp("[<>]", unknown()),''); // NOT OK
}