Skip to content

搜索功能泄露加密文章部分内容 #385

@Pepste2

Description

@Pepste2

Issue Checklist | Issue 检查清单

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(屏幕截图)
    QQ20250110-111139

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions