From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 235E11FF09E for ; Tue, 18 Aug 2026 17:14:35 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id AEDF62137E; Tue, 18 Aug 2026 17:14:34 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 18 Aug 2026 17:14:31 +0200 Message-Id: From: "Shan Shaji" To: "Shan Shaji" , "Thomas Ellmenreich" , Subject: Re: [PATCH proxmox 3/4] api-types: add a scheme generic URL regex X-Mailer: aerc 0.20.0 References: <20260813150551.415237-1-t.ellmenreich@proxmox.com> <20260813150551.415237-4-t.ellmenreich@proxmox.com> In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1787066049373 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.635 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: FRRQVJHD5CIURQPG6ZIDF7AT3A2BUU24 X-Message-ID-Hash: FRRQVJHD5CIURQPG6ZIDF7AT3A2BUU24 X-MailFrom: s.shaji@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 Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: I forgot to mention that I also tested the pveauth:// URI without the host part in PVE and received a response. So, the change I mentioned in my previous reply aligns with PVE as well. Sorry for the noise.=20 On Tue Aug 18, 2026 at 5:08 PM CEST, Shan Shaji wrote: > Hi, > > I have tested the changes and went through the code. AFAICT, > everything looks good except for one thing. > > Without the changes, when sending a curl request, I got the error > as mentioned in the ticket. After applying the fix, the > "redirect-url" regex validation works when using the same test URLs from > the test and I am getting a valid "data" response. However, when > using the redirect URIs without the host part (e.g: pveauth://, proxman:/= /), > the validation still fails. > > AFAIK, in Android and iOS, since the host part is not mandatory for > custom schemes, IMHO it would be better to support the case where > the host part is optional as well. That is, as we discussed off > list: for http(s) URLs, the host part is mandatory, and for custom > URLs, the host part doesn't have to be mandatory. > > On Thu Aug 13, 2026 at 5:05 PM CEST, Thomas Ellmenreich wrote: >> The current URL regex, HTTP_URL_REGEX, is specific to the HTTP and HTTPS >> schemes. This patch creates a new regex that is scheme-generic and thus >> allows any other valid scheme. >> >> It also adds tests that cover some basic URL edge cases. >> >> Signed-off-by: Thomas Ellmenreich >> --- >> pbs-api-types/src/lib.rs | 1 + >> proxmox-schema/src/api_types.rs | 40 ++++++++++++++++++++++++++++++++- >> 2 files changed, 40 insertions(+), 1 deletion(-) >> >> diff --git a/pbs-api-types/src/lib.rs b/pbs-api-types/src/lib.rs >> index 21ef733d..924f356b 100644 >> --- a/pbs-api-types/src/lib.rs >> +++ b/pbs-api-types/src/lib.rs >> @@ -44,6 +44,7 @@ pub use proxmox_schema::api_types::HTTP_URL_SCHEMA; >> pub use proxmox_schema::api_types::MULTI_LINE_COMMENT_SCHEMA; >> pub use proxmox_schema::api_types::NODE_SCHEMA; >> pub use proxmox_schema::api_types::SINGLE_LINE_COMMENT_FORMAT; >> +pub use proxmox_schema::api_types::URL_SCHEMA; >> pub use proxmox_schema::api_types::{ >> BLOCKDEVICE_DISK_AND_PARTITION_NAME_SCHEMA, BLOCKDEVICE_NAME_SCHEMA= , >> }; > >>>snip<<