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
21cfee12
Commit
21cfee12
authored
Apr 21, 2019
by
Junling Bu
Browse files
fix[litemall-admin-api]: 不能通过管理员编辑接口修改密码
parent
aec557e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminAdminController.java
View file @
21cfee12
...
...
@@ -116,10 +116,8 @@ public class AdminAdminController {
return
ResponseUtil
.
badArgument
();
}
String
rawPassword
=
admin
.
getPassword
();
BCryptPasswordEncoder
encoder
=
new
BCryptPasswordEncoder
();
String
encodedPassword
=
encoder
.
encode
(
rawPassword
);
admin
.
setPassword
(
encodedPassword
);
// 不允许管理员通过编辑接口修改密码
admin
.
setPassword
(
null
);
if
(
adminService
.
updateById
(
admin
)
==
0
)
{
return
ResponseUtil
.
updatedDataFailed
();
...
...
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