Merge pull request #2271 from StarryKira/fix/redact-account-credentials

fix(security): 屏蔽 admin 账号接口返回的敏感凭证字段
This commit is contained in:
Wesley Liddick
2026-05-19 16:15:36 +08:00
committed by GitHub
13 changed files with 661 additions and 27 deletions
@@ -43,6 +43,9 @@ type DataProxy struct {
Status string `json:"status"`
}
// DataAccount 是管理员显式备份导出使用的账号结构,故意不走 dto.Account 的脱敏路径,
// Credentials 原文返回。这是"管理员备份"这一显式行为的一部分;如未来需要导出脱敏版本,
// 应新增独立结构而非修改这里。
type DataAccount struct {
Name string `json:"name"`
Notes *string `json:"notes,omitempty"`