mirror of
https://github.com/sasjs/server.git
synced 2025-12-11 03:34:35 +00:00
fix: added CSRF check for granting access via session authentication
This commit is contained in:
@@ -14,11 +14,6 @@ webRouter.get('/', async (_, res) => {
|
||||
return res.send('Web Build is not present')
|
||||
})
|
||||
|
||||
webRouter.get('/form', function (req, res) {
|
||||
// pass the csrfToken to the view
|
||||
res.send({ csrfToken: req.csrfToken() })
|
||||
})
|
||||
|
||||
webRouter.post('/login', async (req, res) => {
|
||||
const { error, value: body } = loginWebValidation(req.body)
|
||||
if (error) return res.status(400).send(error.details[0].message)
|
||||
|
||||
Reference in New Issue
Block a user