Remote provisioning: do not be that strict for history filepath (#103103)

Do not be that strict for history filepath
This commit is contained in:
Roberto Jiménez Sánchez
2025-03-31 16:50:19 +03:00
committed by GitHub
parent 4cb756c5d1
commit 87aa2cba36
+2 -2
View File
@@ -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
}