From d620e09f8cb4994d15e046d2c373e23f34196abe Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 18 Mar 2025 14:01:09 +0000 Subject: [PATCH] apply security patch: release-11.4.3/343-202503050952.patch commit b5f57f419b374f3329d93c17ad30ed52d1a84ed5 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 1d74aec3e99..7254ed313b8 100644 --- a/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.ts +++ b/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.ts @@ -295,7 +295,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 cb09e66048a..b707acd5ad2 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) {