mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
13 lines
321 B
JavaScript
13 lines
321 B
JavaScript
var express = require('express');
|
|
|
|
var app = express();
|
|
|
|
app.get('/user/:id', function(req, res) {
|
|
if (!isValidUserId(req.params.id))
|
|
// BAD: a request parameter is incorporated without validation into the response
|
|
res.send("Unknown user: " + req.params.id);
|
|
else
|
|
// TODO: do something exciting
|
|
;
|
|
});
|