完成审计重开与敏感设置脱敏切片

重开阶段2、4、5、8、9、10的完成状态,明确测试通过不等于架构完成。

管理端系统设置不再返回敏感明文,支持敏感配置保留与显式清除;dbverify仅输出Cookie长度和指纹;同步前端脱敏状态、回归测试和嵌入资源。

验证:make check;npm test --prefix frontend;npm run typecheck --prefix frontend。
This commit is contained in:
Christ committed 2026-08-15 12:53:02 +08:00
1 parent 5d4f2d3a5f
commit 0a45fd4a8b
17 files changed
+289 -36

No files matched your search

+4 -1
View File
@@ -14,6 +14,7 @@ package main
import (
"context"
"crypto/rand"
"crypto/sha256"
"encoding/hex"
"fmt"
"os"
@@ -112,7 +113,9 @@ func main() {
}
// v 保存v,供当前处理流程使用
v, _ := store.Cookies.GetValue(ctx, accountID)
fmt.Printf("✅ cookie upsert 成功,value=%s\n", v)
// fingerprint 是 Cookie 的不可逆校验指纹,仅用于验证 upsert 结果。
fingerprint := sha256.Sum256([]byte(v))
fmt.Printf("✅ cookie upsert 成功,length=%d fingerprint=%x\n", len(v), fingerprint[:8])
// 3) 系统设置 upsert(dialectUpsert + key 保留字引用)
if err := store.Settings.Set(ctx, "theme_color", "blue"); err != nil {