Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
fdad5b0f
Commit
fdad5b0f
authored
Jul 26, 2018
by
Junling Bu
Browse files
fix[litemall-admin-api]: 管理员修改管理员密码时没有加密存储
parent
f8312ca4
Changes
1
Hide whitespace changes
Inline
Side-by-side
litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminAdminController.java
View file @
fdad5b0f
...
...
@@ -104,6 +104,11 @@ public class AdminAdminController {
return
ResponseUtil
.
fail
(
403
,
"超级管理员不能修改"
);
}
String
rawPassword
=
admin
.
getPassword
();
BCryptPasswordEncoder
encoder
=
new
BCryptPasswordEncoder
();
String
encodedPassword
=
encoder
.
encode
(
rawPassword
);
admin
.
setPassword
(
encodedPassword
);
adminService
.
updateById
(
admin
);
return
ResponseUtil
.
ok
(
admin
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment