[pve-devel] [PATCH manager] fix #5121: ui: node status: avoid invalid array access for certain foreign kernels

Fiona Ebner f.ebner at proxmox.com
Thu Dec 14 11:34:44 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/manager6/node/StatusView.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/manager6/node/StatusView.js b/www/manager6/node/StatusView.js
index 24b2c8d8..0ac200c7 100644
--- a/www/manager6/node/StatusView.js
+++ b/www/manager6/node/StatusView.js
@@ -109,7 +109,7 @@ Ext.define('PVE.node.StatusView', {
 		    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 pve-devel mailing list