Authored by 周少峰

Merge branch 'hotfix/loginCode'

... ... @@ -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);
};
// 中间件
... ...
... ... @@ -63,7 +63,7 @@
"uuid": "^2.0.2",
"yoho-express-session": "^2.0.0",
"yoho-node-lib": "0.2.8",
"yoho-zookeeper": "^1.0.6"
"yoho-zookeeper": "^1.0.8"
},
"devDependencies": {
"autoprefixer": "^6.3.6",
... ...