This commit is contained in:
Niko 2022-02-13 02:03:53 +01:00
parent d0cd3e2caa
commit 0b33e89d81
1 changed files with 2 additions and 2 deletions

View File

@ -7,10 +7,10 @@ module.exports = {
const suffix = reason !== undefined ? '. Reason: '+reason : ''
return res.status(403).send('API endpoint forbidden'+suffix)
}
if (req.cookies['fedilove_session'] === undefined)
return ret403()
const sess = await db.table.sessions().findOne({ session: req.cookies['fedilove_session'] })
if (sess === null)
return ret403()