Commit 75e6630e authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents bf14fa7f e7fcf812
......@@ -64,11 +64,11 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
String loginName = loginForm.getLoginName();
String password = loginForm.getPassword();
//loginForm.setSecurityCode("admin");
if(!StringUtils.isEmpty(loginForm.getMark())){
ret.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
ret.put(KEY_RESULT_MSG, "非法的参数");
return ret.toJSONString();
}
// if(!StringUtils.isEmpty(loginForm.getMark())){
// ret.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
// ret.put(KEY_RESULT_MSG, "非法的参数");
// return ret.toJSONString();
// }
String ip = super.getRequestIP(request);
if (StringUtils.isEmpty(loginName) || StringUtils.isEmpty(password)) {
ret.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
......@@ -82,7 +82,7 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
UserEntity userEntity = null;
try {
loginForm.validate();
boolean validCode = validCodeService.doCheckImageValidCode(this.request.getSession().getId(), super.getRequestIP(request), loginForm.getSecurityCode());
boolean validCode = validCodeService.doCheckImageValidCode(loginForm.getMark(), super.getRequestIP(request), loginForm.getSecurityCode());
if (!validCode) {
throw new AppException("验证码错误");
}
......
......@@ -26,7 +26,7 @@ public class SecurityCodeController
public void createCode(HttpServletRequest request, HttpServletResponse response) {
//log.info("Session:"+this.request.getSession().getId());
// 获取默认难度和长度的验证码
String securityCode = validCodeService.createImageValidCode(this.request.getSession().getId(), super.getRequestIP(request));
String securityCode = validCodeService.createImageValidCode(request.getParameter("mark"), super.getRequestIP(request));
// int imageType = ParamUtil.getInt("securityImage", 1);
int imageType = 0;
switch (imageType) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment