同步闭源分支安全修复
fix(security): 同步闭源分支安全修复
同步闭源分支安全修复ed56bc-fix-change-cve-2026-130856fixsecurity
Committed by liuzimu1995
commit message
fix(security): 同步闭源分支安全修复
- JWT_SECRET 缺失或过弱时拒绝启动,移除硬编码 secret 兜底(含 sandbox 下载 token)
- 安装完成后拒绝重复初始化,避免匿名重置密码/提权;PUT /enterprises/:id 补管理员鉴权
- 文件预览与版本内容接口补登录鉴权、租户与文件 ACL 校验Editor assessment
This commit patches CVE-2026-130856. The subject is process-oriented - synchronizing security fixes from the closed-source branch - which tells a reader where the change came from rather than what it does. The body does the real work: it lists refusing to start when JWT_SECRET is missing or weak, removing the hardcoded fallback, rejecting repeat initialization so anonymous callers cannot reset passwords, adding admin authorization to the enterprise PUT, and restoring login plus tenant and file ACL checks on preview endpoints. Specific, but written in Chinese under a vague headline.