Skip to content

Commit

Permalink
Update CommentPublicQueryServiceImpl.java
Browse files Browse the repository at this point in the history
提升安全性
将MD5切换为sha256
  • Loading branch information
cryptochecktool authored Nov 28, 2024
1 parent 033a77e commit ee0f2e0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ private Mono<? extends CommentVo> filterCommentSensitiveData(CommentVo commentVo
specOwner.setName("");
var email = owner.getEmail();
if (StringUtils.isNotBlank(email)) {
var emailHash = DigestUtils.md5DigestAsHex(email.getBytes());
var emailHash = DigestUtils.sha256DigestAsHex(email.getBytes());
if (specOwner.getAnnotations() == null) {
specOwner.setAnnotations(new HashMap<>(2));
}
Expand Down Expand Up @@ -224,7 +224,7 @@ private Mono<? extends ReplyVo> filterReplySensitiveData(ReplyVo replyVo) {
specOwner.setName("");
var email = owner.getEmail();
if (StringUtils.isNotBlank(email)) {
var emailHash = DigestUtils.md5DigestAsHex(email.getBytes());
var emailHash = DigestUtils.sha256DigestAsHex(email.getBytes());
if (specOwner.getAnnotations() == null) {
specOwner.setAnnotations(new HashMap<>(2));
}
Expand Down

0 comments on commit ee0f2e0

Please sign in to comment.