Repository navigation
v7.1.2 — 重新构建前端产物,dompurify 3.4.17 真正生效
What's Changed
🐛 Bug Fixes / 问题修复
这个版本修了什么 / What this release fixes
v7.1.1 的 dompurify 安全升级没有真正生效。
#67 只改了 frontend_src/package.json 和 package-lock.json,但没有重新构建并提交 custom_components/hacs_vision/frontend/panel.js。而 HACS 用户安装的是仓库里提交的构建产物,不是源码。
修复前的证据:
v7.1.1 的 panel.js : blob sha 4373ad0c4e65
main 的 panel.js : blob sha 4373ad0c4e65 ← 完全相同
内嵌 dompurify : 3.4.8 ← 仍是漏洞版本
修复后:
main 的 panel.js : blob sha e4c82d899656
内嵌 dompurify : 3.4.17 ← 已修复版本
The dompurify security upgrade in v7.1.1 never reached users. #67 bumped the dependency in the sources but did not rebuild the committed artifact, and HACS installs that artifact. This release rebuilds it.
关于漏洞 / About the advisory
GHSA-cg2g-xh64-v4q7 需要 SAFE_FOR_TEMPLATES 与 DOM 返回模式(RETURN_DOM / RETURN_DOM_FRAGMENT / IN_PLACE)同时启用,本仓库四项均为 0 处使用,实际不可达。
但产物不该带着已知漏洞版本发布。
验证 / Verified
panel.js内嵌 dompurify:3.4.8→3.4.17node --check panel.js语法通过- 9 个
customElements.define全部存在 DOMPurify.sanitize调用点完好- 构建缓存哈希
38c7e7854e
升级建议 / Upgrade
从 v7.1.0 或 v7.1.1 升级到 v7.1.2 后,前端资源会因缓存哈希变化而自动刷新,无需手工清缓存。
Full Changelog: v7.1.1...v7.1.2