Authored by zhaoyue

MOD admin pass

... ... @@ -47,9 +47,11 @@ public class LoginServiceImpl implements ILoginService{
return null;
}else{
String salt = admin.getSalt();
String adminType = Integer.toString(admin.getType());
String str = admin.getAccount() + password + adminType + salt; // 构建待加密字符串
String calcuPass = SecurityTool.encode(SecurityTool.ALGORITHM_MD5, str);
String pass_in_db = admin.getPwd();
String pass = SecurityTool.getPassword(username, password, salt);
if (!pass.equals(pass_in_db))//密码错误
if (!calcuPass.equals(pass_in_db))//密码错误
return null;
}
return admin;
... ...