Authored by 周少峰

Merge branch 'hotfix/loginCode'

@@ -10,8 +10,8 @@ const CAPTCHA = 'yoho4946abcdef#$%&!@'; @@ -10,8 +10,8 @@ const CAPTCHA = 'yoho4946abcdef#$%&!@';
10 10
11 // 对比函数 11 // 对比函数
12 const _mustEqual = (req) => { 12 const _mustEqual = (req) => {
13 - return req.body.verifyCode === req.session.captcha ||  
14 - req.body.verifyCode === CAPTCHA; 13 + return req.session.captcha && (req.body.verifyCode === req.session.captcha ||
  14 + req.body.verifyCode === CAPTCHA);
15 }; 15 };
16 16
17 // 中间件 17 // 中间件
@@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@
63 "uuid": "^2.0.2", 63 "uuid": "^2.0.2",
64 "yoho-express-session": "^2.0.0", 64 "yoho-express-session": "^2.0.0",
65 "yoho-node-lib": "0.2.8", 65 "yoho-node-lib": "0.2.8",
66 - "yoho-zookeeper": "^1.0.6" 66 + "yoho-zookeeper": "^1.0.8"
67 }, 67 },
68 "devDependencies": { 68 "devDependencies": {
69 "autoprefixer": "^6.3.6", 69 "autoprefixer": "^6.3.6",