修正账号登录安全选项锁定账号失效的问题

This commit is contained in:
thinkgem
2019-01-23 20:55:23 +08:00
parent b57ae4930b
commit 038e89316a
2 changed files with 7 additions and 1 deletions

View File

@@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.jeesite.common.codec.DesUtils;
import com.jeesite.common.config.Global;
import com.jeesite.common.lang.StringUtils;
import com.jeesite.common.shiro.filter.FormAuthenticationFilter;
@@ -135,6 +136,11 @@ public class LoginController extends BaseController{
String exception = (String)request.getAttribute(FormAuthenticationFilter.DEFAULT_ERROR_KEY_ATTRIBUTE_NAME);
String message = (String)request.getAttribute(FormAuthenticationFilter.DEFAULT_MESSAGE_PARAM);
String secretKey = Global.getProperty("shiro.loginSubmit.secretKey");
if (StringUtils.isNotBlank(secretKey)){
username = DesUtils.decode(username, secretKey);
}
model.addAttribute(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM, username);
model.addAttribute(FormAuthenticationFilter.DEFAULT_REMEMBER_ME_PARAM, rememberMe);
model.addAttribute(FormAuthenticationFilter.DEFAULT_REMEMBER_USERCODE_PARAM, rememberUserCode);

View File

@@ -34,7 +34,7 @@
</div>
<% } -->*/%>
<div class="form-group has-feedback" id="isValidCodeLogin" style="display:${isValidCodeLogin?'blank':'none'}">
<#form:validcode name="validCode" isRequired="true" isRemote="true" isLazy="false"/>
<#form:validcode name="validCode" isRequired="true" isRemote="true" isLazy="true"/>
</div>
<div class="form-group">
<div class="mt5 icheck">