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 0D8DA1FF0B3 for ; Wed, 11 Nov 2026 12:12:04 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 8DDED215FC; Wed, 11 Nov 2026 12:12:03 +0100 (CET) Message-ID: Date: Wed, 11 Nov 2026 12:11:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH proxmox-backup] bin: debug: api: fix panic on parameters given more than once To: Jakob-Tobias Winter , tobias@linuxdingsda.de, pbs-devel@lists.proxmox.com References: <20261109215938.903397-1-tobias@stuttgart.de> Content-Language: en-US, de-DE From: Christian Ebner In-Reply-To: <20261109215938.903397-1-tobias@stuttgart.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1794395520002 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.421 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: XLVGNURN5OVY2PKMJYMDPUHFHVYWKN3O X-Message-ID-Hash: XLVGNURN5OVY2PKMJYMDPUHFHVYWKN3O X-MailFrom: c.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 11/9/26 11:07 PM, Jakob-Tobias Winter wrote: > Array parameters, for example 'group-filter', are set by giving the > parameter once per value. The command line parser collects the values of > a repeated parameter in an array, while the 'api' subcommands expected a > single string for each parameter and panicked with "entered unreachable > code". So array parameters could only be passed with one value. > > Hand each value over to the parameter verification separately. Array > parameters now accept more than one value, and other parameters that are > given more than once get rejected as duplicate instead of causing a > panic. > > Signed-off-by: Jakob-Tobias Winter Thanks for the patch! Only minor remarks: Changes fix the panic, leave however the unreachable! macro in place. IMO it would make more sense to propagate these errors and show a meaningful error message in the CLI for the respective code paths. That should also cover param not being a Value::Object. Further this would benefit from some regression tests.