From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id CCFCC1FF16F for ; Tue, 14 Oct 2025 10:55:59 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D395B24188; Tue, 14 Oct 2025 10:56:17 +0200 (CEST) Message-ID: <0e963ca7-b8ad-4743-958f-043c7c81b237@proxmox.com> Date: Tue, 14 Oct 2025 10:55:43 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox Datacenter Manager development discussion , Dominik Csapak References: <20251014071221.454180-1-d.csapak@proxmox.com> Content-Language: en-US, de-DE From: Christian Ebner In-Reply-To: <20251014071221.454180-1-d.csapak@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1760432107053 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.043 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. [proxmox.com] Subject: Re: [pdm-devel] [PATCH datacenter-manager] ui: pbs wizard: strip http(s):// prefix on remote creation X-BeenThere: pdm-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Datacenter Manager development discussion Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "pdm-devel" On 10/14/25 9:12 AM, Dominik Csapak wrote: > by reusing our 'normalize_hostname' helper. Move that to the remote > module, make it (crate) public, and use it for the case when we don't > have a nodes list (which is only pbs at the moment). > > This strips the 'http(s)://' prefix when submitting the remote to the > backend, and preventing the 'invalid uri character' error there. > > Reported in the forum: > https://forum.proxmox.com/threads/cant-add-proxmox-backup-server-node.173560/ > > Signed-off-by: Dominik Csapak > --- Changes look good to me and fix the issue. Only one small nit: The PBS remote add wizard summary page still shows the non-striped hostname, the host to be added has it however stripped. Would it make sense to update the field text in the connect page, not just the ConnectParams? We do already update the fingerprint before the `call_on_connect_change()` invocation, so something like the diff below should do just that. ``` --- a/ui/src/remotes/wizard_page_connect.rs +++ b/ui/src/remotes/wizard_page_connect.rs @@ -211,6 +211,11 @@ impl Component for PdmWizardPageConnect { Some(info.clone()) } }; + let raw_hostname = props.info.form_ctx.read().get_field_text("hostname"); + props.info.form_ctx.write().set_field_value( + "hostname", + normalize_hostname(raw_hostname).into(), + ); call_on_connect_change(props, connection); self.scan_result = None; props.info.reset_remaining_valid_pages(); ``` But this is cosmetic only. Consider: Reviewed-by: Christian Ebner Tested-by: Christian Ebner _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel