Commit 6df461e3559aff2824cae327b26a710e7f647839
1 parent
d245fada
1.模糊登录信息提示,修改以sessionId作为验证码的出现基准
Showing
1 changed file
with
2 additions
and
2 deletions
src/main/java/com/bsth/controller/sys/UserController.java
| @@ -76,7 +76,7 @@ public class UserController extends BaseController<SysUser, Integer> { | @@ -76,7 +76,7 @@ public class UserController extends BaseController<SysUser, Integer> { | ||
| 76 | HttpSession session = request.getSession(); | 76 | HttpSession session = request.getSession(); |
| 77 | rs.put("captcha", session.getAttribute("captcha")); | 77 | rs.put("captcha", session.getAttribute("captcha")); |
| 78 | 78 | ||
| 79 | - if (captchaMap.get(userName) != null && captchaMap.get(userName) >= 3) { | 79 | + if (captchaMap.get(session.getId()) != null && captchaMap.get(session.getId()) >= 3) { |
| 80 | //校验验证码 | 80 | //校验验证码 |
| 81 | String verCode = (String) session | 81 | String verCode = (String) session |
| 82 | .getAttribute(com.google.code.kaptcha.Constants.KAPTCHA_SESSION_KEY); | 82 | .getAttribute(com.google.code.kaptcha.Constants.KAPTCHA_SESSION_KEY); |
| @@ -142,7 +142,7 @@ public class UserController extends BaseController<SysUser, Integer> { | @@ -142,7 +142,7 @@ public class UserController extends BaseController<SysUser, Integer> { | ||
| 142 | List<CompanyAuthority> cmyAuths = companyAuthorityService.findByUser(user); | 142 | List<CompanyAuthority> cmyAuths = companyAuthorityService.findByUser(user); |
| 143 | session.setAttribute(Constants.COMPANY_AUTHORITYS, cmyAuths); | 143 | session.setAttribute(Constants.COMPANY_AUTHORITYS, cmyAuths); |
| 144 | 144 | ||
| 145 | - captchaMap.remove(userName); | 145 | + captchaMap.remove(session.getId()); |
| 146 | rs.put("status", ResponseCode.SUCCESS); | 146 | rs.put("status", ResponseCode.SUCCESS); |
| 147 | 147 | ||
| 148 | // 记录登录日志 | 148 | // 记录登录日志 |