From 621bd18c419b5ff24d3bf44d148db8a7ead135f6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 24 Mar 2025 09:49:22 +0000 Subject: [PATCH] apply security patch: release-11.1.13/345-202503050955.patch commit a9bcef23917cc0c6dbabd44ab1be684d15e38929 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 2d76314a1cb..3d583fe25e1 100644 --- a/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.ts +++ b/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.ts @@ -463,7 +463,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, options: panel.options ?? {}, diff --git a/public/app/features/dashboard/dashgrid/DashboardGrid.tsx b/public/app/features/dashboard/dashgrid/DashboardGrid.tsx index f265fe4f52a..608adb06b9a 100644 --- a/public/app/features/dashboard/dashgrid/DashboardGrid.tsx +++ b/public/app/features/dashboard/dashgrid/DashboardGrid.tsx @@ -110,6 +110,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) {