oudecheng
58f461c953
fix: 修复 SSRF 重定向绕过 + 符号链接路径遍历 + TodoItemSummary 字段缺失
P0: src/tools/http_request.rs SSRF 重定向绕过
- reqwest::Client 默认跟随最多 10 次重定向,is_private_host 仅检查初始 URL
- 攻击者可用公网 URL 返回 302 → http://127.0.0.1/ 或
http://169.254.169.254/(云元数据端点)绕过防护访问内网
- 修复:.redirect(reqwest::redirect::Policy::none()) 完全禁用重定向
P1: src/tools/file_read/write/edit.rs 符号链接路径遍历
- resolve_path 用 starts_with 检查但未 canonicalize
- 攻击者可在 allowed_dir 内创建指向 /etc/passwd 的符号链接绕过限制
- 修复:对 resolved 和 allowed 均执行 canonicalize 后比较
- file_read: 文件必须存在,canonicalize 失败直接报错
- file_write/edit: 文件可能不存在,降级到父目录 canonicalize
P1: src/protocol/mod.rs + list_todos.rs TodoItemSummary 字段缺失
- 后端 TodoItemSummary 仅返回 4 字段,前端期望 7 字段
- 缺失 priority, created_at, updated_at,前端 TodoPanel 无法显示
优先级和时间戳
- 修复:struct 补齐 3 字段,list_todos 构造时传递完整字段
2026-07-08 16:23:09 +08:00
..
2026-07-06 18:07:10 +08:00
2026-07-08 16:23:09 +08:00
2026-05-13 17:48:33 +08:00
2026-05-15 15:01:58 +08:00
2026-06-16 16:52:00 +08:00
2026-06-12 18:01:57 +08:00
2026-05-13 17:48:33 +08:00