mirror of
https://github.com/github/codeql.git
synced 2025-12-20 18:56:32 +01:00
14 lines
396 B
JavaScript
14 lines
396 B
JavaScript
var express = require('express');
|
|
|
|
var app = express();
|
|
|
|
app.get('/some/path', function(req, res) {
|
|
// NOT OK
|
|
var f = new Function("return wibbles[" + req.param("wobble") + "];");
|
|
// NOT OK
|
|
require("vm").runInThisContext("return wibbles[" + req.param("wobble") + "];");
|
|
var runC = require("vm").runInNewContext;
|
|
// NOT OK
|
|
runC("return wibbles[" + req.param("wobble") + "];");
|
|
});
|