From 2fb1e0d107499e6d85f4c9133e0fa4f531249f2d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 25 Mar 2025 12:59:57 +0000 Subject: [PATCH] apply security patch: release-10.4.17/347-202503050958.patch commit b7184f744bea3838baea12de4a02da715a4f5afd 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 b85744efcfe..b0e6903701b 100644 --- a/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.ts +++ b/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.ts @@ -432,7 +432,7 @@ export function buildGridItemForPanel(panel: PanelModel): SceneGridItemLike { 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 02969867235..95b898576ea 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) {