Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User实体里的updateFrom方法未给密码加密导致更新后以明文存储密码 #19

Closed
Chennyh opened this issue Jun 15, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@Chennyh
Copy link

Chennyh commented Jun 15, 2020

    public void updateFrom(UserUpdateRequest userUpdateRequest) {
        if (Objects.nonNull(userUpdateRequest.getFullName())) {
            this.setFullName(userUpdateRequest.getFullName());
        }
        if (Objects.nonNull(userUpdateRequest.getPassword())) {
            this.setPassword(userUpdateRequest.getPassword());
        }
        if (Objects.nonNull(userUpdateRequest.getEnabled())) {
            this.setEnabled(userUpdateRequest.getEnabled());
        }
    }
@Snailclimb
Copy link
Owner

    public void updateFrom(UserUpdateRequest userUpdateRequest) {
        if (Objects.nonNull(userUpdateRequest.getFullName())) {
            this.setFullName(userUpdateRequest.getFullName());
        }
        if (Objects.nonNull(userUpdateRequest.getPassword())) {
            this.setPassword(userUpdateRequest.getPassword());
        }
        if (Objects.nonNull(userUpdateRequest.getEnabled())) {
            this.setEnabled(userUpdateRequest.getEnabled());
        }
    }

已经修改。

@Snailclimb Snailclimb added the bug Something isn't working label Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants