mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
JS: Add test with route handler indirection
This commit is contained in:
@@ -0,0 +1 @@
|
||||
| query-tests/Security/CWE-073/routes.js:2 | expected an alert, but found none | NOT OK | |
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
exports.foo = function(req, res) {
|
||||
res.render('foo', req.body); // NOT OK
|
||||
}
|
||||
@@ -27,4 +27,7 @@ function indirect(res, obj) {
|
||||
res.render("template", str); // OK
|
||||
|
||||
res.render("template", JSON.parse(str)); // NOT OK
|
||||
}
|
||||
}
|
||||
|
||||
let routes = require('./routes');
|
||||
app.post('/foo', routes.foo);
|
||||
|
||||
Reference in New Issue
Block a user