Merge branch 'zhaoyue-dev4' into 'master'
MOD admin pass See merge request !39
Showing
2 changed files
with
5 additions
and
3 deletions
@@ -4,6 +4,6 @@ git add push.sh | @@ -4,6 +4,6 @@ git add push.sh | ||
4 | git add pom.xml | 4 | git add pom.xml |
5 | git commit -m "MOD admin pass" | 5 | git commit -m "MOD admin pass" |
6 | #git push origin master | 6 | #git push origin master |
7 | -git push origin zhaoyue-dev3 | 7 | +git push origin zhaoyue-dev4 |
8 | git status | 8 | git status |
9 | git pull | 9 | git pull |
@@ -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