From 4f00a8817eacf3107d1ba5f5f583fef721531784 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 25 Mar 2025 19:59:36 +0000 Subject: [PATCH] apply security patch: release-11.5.3/341-202503050903.patch commit 0d4c8798648fa2a008f6f51dabe85d37ef5ff00c Author: oscarkilhed Date: Fri Feb 28 16:32:58 2025 +0100 Limit number of characters in the title --- .../dashboard-scene/serialization/transformSaveModelToScene.ts | 2 +- public/app/features/dashboard/dashgrid/DashboardGrid.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.ts b/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.ts index 22a8c119054..1252678b1d2 100644 --- a/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.ts +++ b/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.ts @@ -307,7 +307,7 @@ export function buildGridItemForPanel(panel: PanelModel): DashboardGridItem { const vizPanelState: VizPanelState = { key: getVizPanelKeyForPanelId(panel.id), - title: panel.title, + title: panel.title?.substring(0, 5000), description: panel.description, pluginId: panel.type ?? 'timeseries', options: panel.options ?? {}, diff --git a/public/app/features/dashboard/dashgrid/DashboardGrid.tsx b/public/app/features/dashboard/dashgrid/DashboardGrid.tsx index 397dfc30c33..a8cd9720e22 100644 --- a/public/app/features/dashboard/dashgrid/DashboardGrid.tsx +++ b/public/app/features/dashboard/dashgrid/DashboardGrid.tsx @@ -111,6 +111,7 @@ export class DashboardGrid extends PureComponent { if (!panel.key) { panel.key = `panel-${panel.id}-${Date.now()}`; } + panel.title = panel.title?.substring(0, 5000); this.panelMap[panel.key] = panel; if (!panel.gridPos) {