From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 3D6191FF187 for ; Tue, 18 Nov 2025 16:16:12 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 3C56E186D3; Tue, 18 Nov 2025 16:16:12 +0100 (CET) From: Stoiko Ivanov To: pve-devel@lists.proxmox.com Date: Tue, 18 Nov 2025 16:15:26 +0100 Message-ID: <20251118151532.592423-2-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251118151532.592423-1-s.ivanov@proxmox.com> References: <20251118151532.592423-1-s.ivanov@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1763478908020 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.070 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [options.rs, proxmox.com] Subject: [pve-devel] [PATCH installer 1/2] common: pinning: require first character to be lower-case ascii X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" the validation regex in pve-common is: `/^[a-z][a-z0-9_]{1,20}([:\.]\d+)?$/` [0] and thus requires the first byte of an interface to be lower-case ascii. Adapt the error-message and the validation accordingly [0] https://git.proxmox.com/?p=pve-common.git;a=blob;f=src/PVE/JSONSchema.pm;h=827889950b9165dd22e7b12e934d08fd8b21e855;hb=HEAD#l680 Fixes: aa0ddcd ("common: pinning: make interface name checks stricter") Reported-by: Robert Obkircher Signed-off-by: Stoiko Ivanov --- proxmox-installer-common/src/options.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/proxmox-installer-common/src/options.rs b/proxmox-installer-common/src/options.rs index 8f3b3aa..5933df8 100644 --- a/proxmox-installer-common/src/options.rs +++ b/proxmox-installer-common/src/options.rs @@ -524,9 +524,9 @@ impl NetworkInterfacePinningOptions { } // Mimicking the `pve-iface` schema verification - if !name.starts_with(|c: char| c.is_ascii_alphabetic()) { + if !name.starts_with(|c: char| c.is_ascii_lowercase()) { bail!( - "interface name '{name}' for '{mac}' is invalid: name must start with a letter" + "interface name '{name}' for '{mac}' is invalid: name must start with a lower-case letter" ); } @@ -1034,7 +1034,7 @@ mod tests { assert!(res.is_err()); assert_eq!( res.unwrap_err().to_string(), - "interface name '0nic' for 'ab:cd:ef:12:34:56' is invalid: name must start with a letter" + "interface name '0nic' for 'ab:cd:ef:12:34:56' is invalid: name must start with a lower-case letter" ); options @@ -1045,7 +1045,7 @@ mod tests { assert!(res.is_err()); assert_eq!( res.unwrap_err().to_string(), - "interface name '_a' for 'ab:cd:ef:12:34:56' is invalid: name must start with a letter" + "interface name '_a' for 'ab:cd:ef:12:34:56' is invalid: name must start with a lower-case letter" ); } -- 2.47.3 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel