fix: 完成商务迁移复核与接口优化并清理历史资料

This commit is contained in:
Yvan
2026-11-04 14:45:02 +08:00
parent 5a96be6a79
commit 297e80827d
176 changed files with 6803 additions and 6002 deletions
@@ -59,3 +59,16 @@ func TestPaymentIntegrationConfigUsesRouteLevelSummary(t *testing.T) {
t.Fatal("payment test route was not recognized as sensitive")
}
}
func TestCertificateAliasesAreRedactedInNestedPayloads(t *testing.T) {
raw := []byte(`{"config":{"app_cert_content":"secret-cert","keys":[{"key_content":"secret-key"}],"cert_path":"private-file","template_content":"keep"}}`)
got := redactJSON(raw, "application/json", 4096)
for _, secret := range []string{"secret-cert", "secret-key", "private-file"} {
if strings.Contains(got, secret) {
t.Fatalf("certificate alias leaked: %s", got)
}
}
if !strings.Contains(got, `"template_content":"keep"`) {
t.Fatal("ordinary content was masked")
}
}