aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/users.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/users.ts')
-rw-r--r--server/middlewares/validators/users.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts
index 7002de20d..db03dc231 100644
--- a/server/middlewares/validators/users.ts
+++ b/server/middlewares/validators/users.ts
@@ -1,9 +1,8 @@
1import * as Bluebird from 'bluebird' 1import * as Bluebird from 'bluebird'
2import * as express from 'express' 2import * as express from 'express'
3import 'express-validator' 3import { body, param } from 'express-validator'
4import { body, param } from 'express-validator/check'
5import { omit } from 'lodash' 4import { omit } from 'lodash'
6import { isIdOrUUIDValid } from '../../helpers/custom-validators/misc' 5import { isIdOrUUIDValid, toIntOrNull } from '../../helpers/custom-validators/misc'
7import { 6import {
8 isUserAdminFlagsValid, 7 isUserAdminFlagsValid,
9 isUserAutoPlayVideoValid, 8 isUserAutoPlayVideoValid,
@@ -358,7 +357,7 @@ const usersVerifyEmailValidator = [
358 .not().isEmpty().withMessage('Should have a valid verification string'), 357 .not().isEmpty().withMessage('Should have a valid verification string'),
359 body('isPendingEmail') 358 body('isPendingEmail')
360 .optional() 359 .optional()
361 .toBoolean(), 360 .customSanitizer(toIntOrNull),
362 361
363 async (req: express.Request, res: express.Response, next: express.NextFunction) => { 362 async (req: express.Request, res: express.Response, next: express.NextFunction) => {
364 logger.debug('Checking usersVerifyEmail parameters', { parameters: req.params }) 363 logger.debug('Checking usersVerifyEmail parameters', { parameters: req.params })