fix(加密解密): 修正加密用户名处理逻辑
build.yaml / build (push) Successful in 42s

This commit is contained in:
xiaoqidun committed 2026-09-30 01:55:44 +08:00
1 parent 4de22f9be7
commit 418a2fa0a7
4 files changed
+5 -14

No files matched your search

+1 -5
View File
@@ -40,11 +40,7 @@ func (e *Editor) SetEncryption(options *EncryptionOptions) error {
}
info := EncryptionInfo{Encrypted: true, Method: "1.1.1", Layers: 1}
if len(options.Password) != 0 {
name := options.UserName
if name == "" {
name = "User"
}
info.Users = []string{name}
info.Users = []string{options.UserName}
} else {
info.Method = "1.1.2"
for _, recipient := range options.Recipients {