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
Email Patches
Plain Diff
Browse Files
Authored by
zhaoyue
8 years ago
Commit
4c91b635fb4921cdfd9c855f0bbe76d26964d700
1 parent
d1261131
MOD admin pass
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
src/main/java/com/xkl/controller/uploadsoft/UpSoftAccountController.java
src/main/java/com/xkl/controller/uploadsoft/UpSoftAccountController.java
View file @
4c91b63
...
...
@@ -110,7 +110,9 @@ public class UpSoftAccountController {
public
ResponseEntity
<
ResultModel
>
modpwd
(
@CurrentAdmin
XklAdminEntity
admin
,
@RequestParam
String
newpwd
)
{
Assert
.
notNull
(
newpwd
,
"password can not be empty"
);
String
salt
=
SecurityTool
.
genSalt
();
String
pass2Db
=
SecurityTool
.
getPassword
(
admin
.
getAccount
(),
newpwd
,
salt
);
String
adminType
=
Integer
.
toString
(
admin
.
getType
());
String
str
=
admin
.
getAccount
()
+
newpwd
+
adminType
+
salt
;
// 构建待加密字符串
String
pass2Db
=
SecurityTool
.
encode
(
SecurityTool
.
ALGORITHM_MD5
,
str
);
admin
.
setPwd
(
pass2Db
);
admin
.
setSalt
(
salt
);
adminRepository
.
save
(
admin
);
...
...
Please
register
or
login
to post a comment