Merge branch 'zhaoyue-dev3' into 'master'
MOD admin pass See merge request !37
Showing
1 changed file
with
4 additions
and
2 deletions
@@ -47,9 +47,11 @@ public class LoginServiceImpl implements ILoginService{ | @@ -47,9 +47,11 @@ public class LoginServiceImpl implements ILoginService{ | ||
47 | return null; | 47 | return null; |
48 | }else{ | 48 | }else{ |
49 | String salt = admin.getSalt(); | 49 | String salt = admin.getSalt(); |
50 | + String adminType = Integer.toString(admin.getType()); | ||
51 | + String str = admin.getAccount() + password + adminType + salt; // 构建待加密字符串 | ||
52 | + String calcuPass = SecurityTool.encode(SecurityTool.ALGORITHM_MD5, str); | ||
50 | String pass_in_db = admin.getPwd(); | 53 | String pass_in_db = admin.getPwd(); |
51 | - String pass = SecurityTool.getPassword(username, password, salt); | ||
52 | - if (!pass.equals(pass_in_db))//密码错误 | 54 | + if (!calcuPass.equals(pass_in_db))//密码错误 |
53 | return null; | 55 | return null; |
54 | } | 56 | } |
55 | return admin; | 57 | return admin; |
-
Please register or login to post a comment