mirror of
https://github.com/github/codeql.git
synced 2025-12-24 12:46:34 +01:00
JS: whitelist quote stripping for js/incomplete-sanitization
This commit is contained in:
@@ -122,6 +122,10 @@ predicate isDelimiterUnwrapper(
|
||||
left = "{" and right = "}"
|
||||
or
|
||||
left = "(" and right = ")"
|
||||
or
|
||||
left = "\"" and right = "\""
|
||||
or
|
||||
left = "'" and right = "'"
|
||||
|
|
||||
removesFirstOccurence(leftUnwrap, left) and
|
||||
removesFirstOccurence(rightUnwrap, right) and
|
||||
|
||||
@@ -192,3 +192,8 @@ app.get('/some/path', function(req, res) {
|
||||
var indirect = /'/;
|
||||
return s.replace(indirect, ""); // NOT OK
|
||||
});
|
||||
|
||||
(function (s) {
|
||||
s.replace('"', '').replace('"', ''); // OK
|
||||
s.replace("'", "").replace("'", ""); // OK
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user