fix: set global signing secret fallback correctly

When falling back to the transfer secret we need to set the global
cfg.URLSigningSecret as well otherwise the Validate() step fails.
This commit is contained in:
Ralf Haferkamp
2025-11-05 10:41:25 +01:00
committed by Ralf Haferkamp
parent 500487f2fa
commit 177afc41c7

View File

@@ -100,14 +100,13 @@ func EnsureCommons(cfg *config.Config) {
cfg.Commons.TransferSecret = cfg.TransferSecret
}
// copy url signing secret to the commons part if set
if cfg.URLSigningSecret != "" {
cfg.Commons.URLSigningSecret = cfg.URLSigningSecret
} else {
// fall back to transfer secret for url signing secret to avoid
// issues when upgradin from an older release
cfg.Commons.URLSigningSecret = cfg.TransferSecret
// make sure url signing secret is set and copy it to the commons part
// fall back to transfer secret for url signing secret to avoid
// issues when upgradin from an older release
if cfg.URLSigningSecret == "" {
cfg.URLSigningSecret = cfg.TransferSecret
}
cfg.Commons.URLSigningSecret = cfg.URLSigningSecret
// copy metadata user id to the commons part if set
if cfg.SystemUserID != "" {