!217 增强验证码校验的语义,更易懂

Merge pull request !217 from Gszekt/N/A
pull/217/MERGE
若依 2020-09-30 15:43:55 +08:00 committed by Gitee
commit d2059ee282
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ public class SysLoginService
public SysUser login(String username, String password)
{
// 验证码校验
if (!StringUtils.isEmpty(ServletUtils.getRequest().getAttribute(ShiroConstants.CURRENT_CAPTCHA)))
if (ShiroConstants.CAPTCHA_ERROR.equals(ServletUtils.getRequest().getAttribute(ShiroConstants.CURRENT_CAPTCHA)))
{
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error")));
throw new CaptchaException();