From 04e9a316076acb838b7d27072c5cede926eca3c1 Mon Sep 17 00:00:00 2001 From: cryptochecktool Date: Mon, 2 Dec 2024 19:35:15 +0800 Subject: [PATCH] Update CommentPublicQueryServiceImpl.java MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加邮件进行小写转换 --- .../app/theme/finders/impl/CommentPublicQueryServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/src/main/java/run/halo/app/theme/finders/impl/CommentPublicQueryServiceImpl.java b/application/src/main/java/run/halo/app/theme/finders/impl/CommentPublicQueryServiceImpl.java index f6bc85adf2..5e68c90a4c 100644 --- a/application/src/main/java/run/halo/app/theme/finders/impl/CommentPublicQueryServiceImpl.java +++ b/application/src/main/java/run/halo/app/theme/finders/impl/CommentPublicQueryServiceImpl.java @@ -174,7 +174,7 @@ private Mono filterCommentSensitiveData(CommentVo commentVo var email = owner.getEmail(); if (StringUtils.isNotBlank(email)) { var emailHash = Hashing.sha256() - .hashString(email, java.nio.charset.StandardCharsets.UTF_8) + .hashString(email.toLowerCase(), java.nio.charset.StandardCharsets.UTF_8) .toString(); if (specOwner.getAnnotations() == null) { specOwner.setAnnotations(new HashMap<>(2)); @@ -228,7 +228,7 @@ private Mono filterReplySensitiveData(ReplyVo replyVo) { var email = owner.getEmail(); if (StringUtils.isNotBlank(email)) { var emailHash = Hashing.sha256() - .hashString(email, java.nio.charset.StandardCharsets.UTF_8) + .hashString(email.toLowerCase(), java.nio.charset.StandardCharsets.UTF_8) .toString(); if (specOwner.getAnnotations() == null) { specOwner.setAnnotations(new HashMap<>(2));