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

任意用户可查看任意评论者信息 #1721

Closed
cnskis opened this issue Mar 8, 2022 · 1 comment · Fixed by #1729
Closed

任意用户可查看任意评论者信息 #1721

cnskis opened this issue Mar 8, 2022 · 1 comment · Fixed by #1729
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@cnskis
Copy link

cnskis commented Mar 8, 2022

是什么版本出现了此问题?

1.4.17

使用的什么数据库?

H2

使用的哪种方式部署?

Fat Jar

在线站点地址

blog.shikangsi.cn

发生了什么?

在文章页有如下请求:https://blog.shikangsi.cn/api/content/posts/1/comments/tree_view?pages=0&page=0&sort=&size=5&total=0
该请求暴露评论者所有信息
image
初步查看,在run.halo.app.repository.base.BaseCommentRepository#findAllByPostIdAndStatusAndParentId(java.lang.Integer, run.halo.app.model.enums.CommentStatus, java.lang.Long, org.springframework.data.domain.Pageable)
使用了findAll,返回所有字段。
建议只返回部分信息,或者置空email、ipAddress、authorUrl三个字段

相关日志输出

No response

附加信息

No response

@cnskis cnskis added the kind/bug Categorizes issue or PR as related to a bug. label Mar 8, 2022
@ruibaby ruibaby added this to the 1.5.x milestone Mar 8, 2022
@guqing guqing self-assigned this Mar 8, 2022
@ruibaby
Copy link
Member

ruibaby commented Mar 8, 2022

email、ipAddress 确实需要屏蔽掉,但是 authorUrl 可以不用。

/cc @halo-dev/sig-halo

我们将在 1.5 解决此问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants