hexo-theme-keep
hexo-theme-keep copied to clipboard
搜索功能泄露加密文章部分内容
Issue Checklist | Issue 检查清单
- [X] I am using Keep version
4.2.5or later. (使用 Keep4.2.5或更高版本) - [X] I have already read the Troubleshooting page of Hexo and Keep documents. (已阅读 Hexo 故障处理页面 和 Keep 文档)
- [X] I have already searched for current issues, which does not help me. (已搜索 Issues,对我没有帮助)
Expected behavior | 预期行为
在我认为的正常情况是,全局搜索是不包含隐藏文章内容的 我不知道这算不算是个Bug,在我已知加密文章的部分内容的情况下,尝试用全局搜索功能可以显示一小段内容,如果攻击者不断枚举关键词甚至可以推测整篇文章的内容,当然了这只是我的猜想
Actual behavior | 实际行为
- Links to demo site with this issue (链接到这个 Issue 的演示网站)
- https://keep.xpoet.cn/post/f41b05a7b521/
- Links to source code of the blog with this issue (链接到这个 Issue 的博客源代码)
- Screenshots(屏幕截图)
Steps to reproduce the behavior | 重现步骤
直接利用全局搜索加密文章关键词即可
Node.js and NPM Information | Node.js 和 NPM 信息
>node -v
v22.11.0
>npm -v
10.9.0
Hexo Configuration | Hexo 配置
##search
search:
path: search.json
field: post
content: true
format: striptags
Keep Configuration | Keep 配置
local_search:
enable: true # Option values: true | false
preload: true # Preload the search data when the page loads. Option values: true | false
Other Information | 其它信息
浏览器:Chrome 131.0.6778.265 操作系统:Windows11 24H2 26100.2605
这确实是个严重的问题,下一版本修复
这确实是个严重的问题,下一版本修复
这个问题恐怕难以通过keep本身修复。hexo-generator-searchdb生成json过程中就会将加密文章的全文放入查找表search.json。也许需要修改hexo-generator-searchdb的生成逻辑或是keep主题在generator生成json文件后再对其做些修改。
补充下,在使用rss的时候,能在rss中直接看到加密文章内容