[pbs-devel] [PATCH proxmox-backup] fix #5117: ui: node info: avoid invalid array access for certain foreign kernels

Fiona Ebner f.ebner at proxmox.com
Thu Dec 14 11:40:24 CET 2023


with custom build date format, which would prevent the panel from loading.

Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 www/panel/NodeInfo.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/panel/NodeInfo.js b/www/panel/NodeInfo.js
index 72f97c7c..454986ef 100644
--- a/www/panel/NodeInfo.js
+++ b/www/panel/NodeInfo.js
@@ -151,7 +151,7 @@ Ext.define('PBS.NodeInfoPanel', {
 		    return data.kversion;
 		}
 		let kernel = data['current-kernel'];
-		let buildDate = kernel.version.match(/\((.+)\)\s*$/)[1] ?? 'unknown';
+		let buildDate = kernel.version.match(/\((.+)\)\s*$/)?.[1] ?? 'unknown';
 		return `${kernel.sysname} ${kernel.release} (${buildDate})`;
 	    },
 	    value: '',
-- 
2.39.2





More information about the pbs-devel mailing list