diff --git a/routes/captcha.ts b/routes/captcha.ts index c5fc7a499ba..c1a194b6a7c 100644 --- a/routes/captcha.ts +++ b/routes/captcha.ts @@ -34,7 +34,7 @@ function captchas () { } captchas.verifyCaptcha = () => (req: Request, res: Response, next: NextFunction) => { - CaptchaModel.findOne({ where: { captchaId: req.body.captchaId } }).then((captcha: Captcha | null) => { + CaptchaModel.findOne({ where: { captchaId: Number(req.body.captchaId) } }).then((captcha: Captcha | null) => { if ((captcha != null) && req.body.captcha === captcha.answer) { next() } else {