WuYongJie 5821d73291 初始提交:3D家具安装展示系统
包含:
- furniture-3d-system:Next.js 16 全栈应用(资产中心、产品管理、3D装配动画)
- autocad-plugin:AutoCAD 家具导出插件源码
- 资产中心改造:编辑弹窗化、删除功能、Toast反馈、自定义Select组件

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 14:00:19 +08:00

1.1 KiB
Raw Blame History

title, date, module, problem_type, severity, symptoms, root_cause, resolution_type, status, confidence, tags, related_patterns
title date module problem_type severity symptoms root_cause resolution_type status confidence tags related_patterns
面板级孔位批量删除越界防护 2026-02-15 panel-hole-route security_issue high
products/[id]/panels/[panelId]/holes?ids= 删除时未校验 hole 是否属于 panelId
Service 批量删除只校验“同一产品”,缺少“同一面板”边界约束 code_fix active high
security
idor
panel
holes
SEC-PANEL-BOUNDARY-001

现象与影响

攻击者可以在面板级接口传入其他面板的 holeId,实现越界删除。

修复动作

  1. holeService.deleteMany 新增 expectedPanelId 参数。
  2. 删除前逐条验证 hole.panelId === expectedPanelId,不符合直接拒绝。
  3. 路由 src/app/api/products/[id]/panels/[panelId]/holes/route.ts 在 DELETE 分支传入 expectedPanelId,并补充空 ids 校验。

验证

  • npm run type-check -- --pretty false 通过
  • npm test -- tests/lib/cad-panel-linking.test.ts --runInBand 通过

预防策略

  • 嵌套路由的批量接口,必须做“URL 资源边界”与“请求体资源边界”双向一致性校验。