mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Fix type checking in password reset controller (#7042)
Lifted from #6942 Fixes #6927
This commit is contained in:
@@ -190,11 +190,11 @@ router.post(
|
||||
router.post(
|
||||
'/password/reset',
|
||||
asyncHandler(async (req, res, next) => {
|
||||
if (req.body.token !== 'string') {
|
||||
if (typeof req.body.token !== 'string') {
|
||||
throw new InvalidPayloadException(`"token" field is required.`);
|
||||
}
|
||||
|
||||
if (req.body.password !== 'string') {
|
||||
if (typeof req.body.password !== 'string') {
|
||||
throw new InvalidPayloadException(`"password" field is required.`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user