Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fangyeqing
/
xkl-interface
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
zhaoyue
8 years ago
Commit
26220f52734ea93c537c32e37ce8e301c971dda2
2 parents
d0badda0
80055cb2
Merge branch 'zhaoyue-dev3' into 'master'
MOD admin pass See merge request
!37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
src/main/java/com/xkl/service/LoginServiceImpl.java
src/main/java/com/xkl/service/LoginServiceImpl.java
View file @
26220f5
...
...
@@ -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
;
...
...
Please
register
or
login
to post a comment