Fix CodeQL log injections (#95)
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
try {
|
||||
|
||||
//Debug
|
||||
login = login.replace(/[\n\r]/g, "")
|
||||
console.debug(`metrics/compute/${login} > start`)
|
||||
console.debug(util.inspect(q, {depth:Infinity, maxStringLength:256}))
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
//Metrics
|
||||
app.get("/:login", ...middlewares, async (req, res) => {
|
||||
//Request params
|
||||
const {login} = req.params
|
||||
const login = req.params.login?.replace(/[\n\r]/g, "")
|
||||
if ((restricted.length)&&(!restricted.includes(login))) {
|
||||
console.debug(`metrics/app/${login} > 403 (not in whitelisted users)`)
|
||||
return res.sendStatus(403)
|
||||
|
||||
Reference in New Issue
Block a user