fix(security): prevent potential prototype pollution via request body filter (#1388)
* fix(security): prevent potential pollution of request body being executed * An array is expected
This commit is contained in:
Родитель
5880356396
Коммит
787e85605c
|
@ -182,7 +182,7 @@ exports.init = async (app) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const bq = await getAllStreamBlobIds({ streamId: req.params.streamId })
|
const bq = await getAllStreamBlobIds({ streamId: req.params.streamId })
|
||||||
const unknownBlobIds = req.body.filter(
|
const unknownBlobIds = [...req.body].filter(
|
||||||
(id) => bq.findIndex((bInfo) => bInfo.id === id) === -1
|
(id) => bq.findIndex((bInfo) => bInfo.id === id) === -1
|
||||||
)
|
)
|
||||||
res.send(unknownBlobIds)
|
res.send(unknownBlobIds)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче