fix: 全面审计修复 — 键盘/印章库/右键/资源/CSP 加固 #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/audit-hardening"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
概述
4 路并行子代理审计(core / modules / wiring+UI / security)交叉验证后修复 8 类问题,11 文件。
修复清单
HIGH
getSavedSeals不校验数组,脏数据打死读/写/渲染三条路径 →Array.isArray校验 + 逐项过滤 + 格式异常自动重置MED
loadAndApplySeal无 onerror 且成功 toast 在 onload 外同步弹 → toast 移入 onload、补 onerrorfireRightClick/stopContextMenu,菜单前findTarget命中置活动对象_canvas触摸链和 body 全子树 observer(fabric 自带触摸兜底)LOW
click()后立即 revoke → 改延迟撤销generateSafeExportFilename加固
object-src 'none'; frame-ancestors 'none'(index.html)escapeHtml()纵深防御(security.js)tmp-global-patch-test-a.js刻意不改(附理由,见 docs/AUDIT-2026-07-21.md)
exporter 恒
degrees(0)(旋转烘焙进位图+lockRotation:true不可触发) / state.js 浅拷贝(已new Set防御) / seal id 毫秒碰撞(极难触发) / pdf.jsisEvalSupported(CSP 已拦 eval) / SVG 白名单(不可利用,保留功能) / 移除script-src 'unsafe-inline'(需搬内联脚本有回归风险,后续单独处理)安全结论
未发现可实际利用的 XSS/注入。防护可信,源于全程
textContent渲染不可信数据的编码纪律。验证
语法全检 + 5 条功能流回归(盖章/签名/批量队列/批量端到端/UI 截图) + 无 CSP 违规,全绿。
详见
docs/AUDIT-2026-07-21.md· cluster-recall #5785🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.