From ea7337cfdee00894792762660fa3c3412aeccccb Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Fri, 3 Jul 2020 10:28:19 +0200 Subject: add check-params test for user list fixes #2918 --- server/middlewares/validators/users.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'server/middlewares/validators') diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts index 6860a3bed..423da9bc0 100644 --- a/server/middlewares/validators/users.ts +++ b/server/middlewares/validators/users.ts @@ -41,10 +41,9 @@ import { Hooks } from '@server/lib/plugins/hooks' const usersListValidator = [ query('blocked') .optional() - .customSanitizer(toBooleanOrNull) .isBoolean().withMessage('Should be a valid boolean banned state'), - async (req: express.Request, res: express.Response, next: express.NextFunction) => { + (req: express.Request, res: express.Response, next: express.NextFunction) => { logger.debug('Checking usersList parameters', { parameters: req.query }) if (areValidationErrors(req, res)) return -- cgit v1.2.3