From 236f7c4bb7737fd44627b729a821780944e767e4 Mon Sep 17 00:00:00 2001 From: matthias Date: Thu, 22 Jan 2026 11:14:24 +0100 Subject: [PATCH] fix to ensure every restore parameter value is quoted --- pkg/cluster/restore.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/cluster/restore.go b/pkg/cluster/restore.go index 4e566fddf..85f6da8d0 100644 --- a/pkg/cluster/restore.go +++ b/pkg/cluster/restore.go @@ -4,6 +4,8 @@ import ( "context" "encoding/json" "fmt" + "strings" + cpov1 "github.com/cybertec-postgresql/cybertec-pg-operator/pkg/apis/cpo.opensource.cybertec.at/v1" spc "github.com/cybertec-postgresql/cybertec-pg-operator/pkg/spec" "github.com/cybertec-postgresql/cybertec-pg-operator/pkg/util/constants" @@ -13,7 +15,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/types" - "strings" ) const ( @@ -198,7 +199,7 @@ func (c *Cluster) generatePgbackrestRestoreConfigmap(restore *cpov1.Restore) (*v optionsArray := make([]string, 0) for key, value := range restore.Options { - optionsArray = append(optionsArray, fmt.Sprintf("--%s=%s", key, value)) + optionsArray = append(optionsArray, fmt.Sprintf("--%s=\"%s\"", key, value)) } options := strings.Join(optionsArray, " ") data["restore_command"] = fmt.Sprintf(" --repo=%v %s",