Merge pull request #4638 from superman2003/fix/s3-secret-ephemeral-encryption-key

fix(backup): 拒绝用自动生成的临时密钥持久化 S3 SecretAccessKey,修复重启后解密失败
This commit is contained in:
Wesley Liddick
2026-07-20 16:21:46 +08:00
committed by GitHub
5 changed files with 140 additions and 15 deletions
@@ -66,7 +66,10 @@ func TestAsyncImageEnablesWithoutRestart(t *testing.T) {
gin.SetMode(gin.TestMode)
repo := &toggleSettingRepo{values: map[string]string{}}
backup := service.NewBackupService(repo, &config.Config{}, passthroughEncryptor{}, nil, nil)
// A fixed encryption key is required to persist a new S3 secret (#4524).
backup := service.NewBackupService(repo, &config.Config{
Totp: config.TotpConfig{EncryptionKeyConfigured: true},
}, passthroughEncryptor{}, nil, nil)
factory := func(context.Context, *config.ImageStorageConfig) (service.ImageStorage, error) {
return noopImageStorage{}, nil
}