From 87aa2cba36f6f243195d816d671c94ab8e125615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20Jim=C3=A9nez=20S=C3=A1nchez?= Date: Mon, 31 Mar 2025 15:50:19 +0200 Subject: [PATCH] Remote provisioning: do not be that strict for history filepath (#103103) Do not be that strict for history filepath --- pkg/registry/apis/provisioning/history.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/registry/apis/provisioning/history.go b/pkg/registry/apis/provisioning/history.go index cc45f63f32d..775dbdacc65 100644 --- a/pkg/registry/apis/provisioning/history.go +++ b/pkg/registry/apis/provisioning/history.go @@ -13,7 +13,7 @@ import ( "github.com/grafana/grafana-app-sdk/logging" provisioning "github.com/grafana/grafana/pkg/apis/provisioning/v0alpha1" "github.com/grafana/grafana/pkg/registry/apis/provisioning/repository" - "github.com/grafana/grafana/pkg/registry/apis/provisioning/resources" + "github.com/grafana/grafana/pkg/registry/apis/provisioning/safepath" ) type historySubresource struct { @@ -76,7 +76,7 @@ func (h *historySubresource) Connect(ctx context.Context, name string, opts runt return } - if err := resources.IsPathSupported(filePath); err != nil { + if err := safepath.IsSafe(filePath); err != nil { responder.Error(apierrors.NewBadRequest(err.Error())) return }