...
|
...
|
@@ -10,8 +10,8 @@ const CAPTCHA = 'yoho4946abcdef#$%&!@'; |
|
|
|
|
|
// 对比函数
|
|
|
const _mustEqual = (req) => {
|
|
|
return req.body.verifyCode === req.session.captcha ||
|
|
|
req.body.verifyCode === CAPTCHA;
|
|
|
return req.session.captcha && (req.body.verifyCode === req.session.captcha ||
|
|
|
req.body.verifyCode === CAPTCHA);
|
|
|
};
|
|
|
|
|
|
// 中间件
|
...
|
...
|
|