From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 743A01FF0A7 for ; Wed, 30 Sep 2026 09:47:49 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id B3EC82176D; Wed, 30 Sep 2026 09:46:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dualfroz.com; s=dkim; t=1790691194; h=from:subject:date:message-id:to:mime-version: content-transfer-encoding; bh=DfP82fDDx0vS6c+xj9PO2ZeadaXalsImKbuWiwroFdU=; b=A1wrSulmwXzNuW6EEwwH3nGoR/8I80nKIDcz45cT5DijHK7WP7nPb8fHPeQeox3X5rrQMU FUXgynQ4E6Y7hP7qEGmEJchYyMZLwD3Nmp8rdE/eIwPxWbSf7DVR4V9sXGwgz/dIFGBH/N tncYNNdKalDUc4ev0J6DB2e6679RYXb85LbMZ/cEmLhR4mE2C2YyGXa3mT4r06vT2z+QEZ 5KWouoiiCT11Vo1HjbMPDP5faCAhFQZi3t/QiH6o8+mjMfmSRuN5T2uBrvi2ZBfX/Jqc6w pJCuXdhkmGNJVWmD6ELYejQn/7HVnUYD0dbFH10zUAwm5TRuYYdWYKAT3WGi4w== From: Michal Fox To: pve-devel@lists.proxmox.com Subject: [PATCH manager] fix #5608: ui: resource mappings: validate the name like the API does Date: Tue, 29 Sep 2026 16:13:13 +0200 Message-ID: <20260929141313.2873638-1-me@dualfroz.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.036 Adjusted score from AWL reputation of From: address DKIM_INVALID 0.1 DKIM or DK signature exists, but is not valid DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DMARC_PASS -0.1 DMARC pass policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record X-MailFrom: me@dualfroz.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation Message-ID-Hash: U3LQPZVV4JHDS7U7FFZLU5K7SUBVI7MO X-Message-ID-Hash: U3LQPZVV4JHDS7U7FFZLU5K7SUBVI7MO X-Mailman-Approved-At: Wed, 30 Sep 2026 09:46:15 +0200 X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The API only accepts resource mapping IDs in the 'pve-configid' format, but the name field of the PCI, USB and directory mapping windows takes any value. A name like 'gpu@node1' is thus only rejected after submitting, with a generic "invalid configuration ID" error that does not tell which characters are allowed. Use the existing 'ConfigId' vtype, so the field is marked invalid right away and its tooltip lists the allowed characters. Signed-off-by: Michal Fox --- www/manager6/window/DirMapEdit.js | 1 + www/manager6/window/PCIMapEdit.js | 1 + www/manager6/window/USBMapEdit.js | 1 + 3 files changed, 3 insertions(+) diff --git a/www/manager6/window/DirMapEdit.js b/www/manager6/window/DirMapEdit.js index 841ff1fe..bc6a7d03 100644 --- a/www/manager6/window/DirMapEdit.js +++ b/www/manager6/window/DirMapEdit.js @@ -142,6 +142,7 @@ Ext.define('PVE.window.DirMapEditWindow', { }, name: 'name', allowBlank: false, + vtype: 'ConfigId', }, { xtype: 'pveNodeSelector', diff --git a/www/manager6/window/PCIMapEdit.js b/www/manager6/window/PCIMapEdit.js index 625f4ad4..28aa4772 100644 --- a/www/manager6/window/PCIMapEdit.js +++ b/www/manager6/window/PCIMapEdit.js @@ -217,6 +217,7 @@ Ext.define('PVE.window.PCIMapEditWindow', { }, name: 'id', allowBlank: false, + vtype: 'ConfigId', }, { xtype: 'displayfield', diff --git a/www/manager6/window/USBMapEdit.js b/www/manager6/window/USBMapEdit.js index 5c90ea3b..ba5e2c60 100644 --- a/www/manager6/window/USBMapEdit.js +++ b/www/manager6/window/USBMapEdit.js @@ -153,6 +153,7 @@ Ext.define('PVE.window.USBMapEditWindow', { }, name: 'name', allowBlank: false, + vtype: 'ConfigId', }, { xtype: 'displayfield', -- 2.43.0