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 EE2871FF170 for ; Thu, 26 Jun 2025 12:46:00 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C738F36E52; Thu, 26 Jun 2025 12:46:35 +0200 (CEST) Date: Thu, 26 Jun 2025 12:46:32 +0200 From: Stoiko Ivanov To: Christoph Heiss Message-ID: <20250626124632.37dbc9f1@rosa.proxmox.com> In-Reply-To: <20250318135919.888083-2-c.heiss@proxmox.com> References: <20250318135919.888083-1-c.heiss@proxmox.com> <20250318135919.888083-2-c.heiss@proxmox.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.063 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, rfc-editor.org, oidc.pm] Subject: [pmg-devel] applied: [PATCH pmg-api 1/2] auth: oidc: fix pattern for `client-id` and `client-key` X-BeenThere: pmg-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Mail Gateway development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pmg-devel@lists.proxmox.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pmg-devel-bounces@lists.proxmox.com Sender: "pmg-devel" applied this one after skimming through the RFC - thanks for the patch! On Tue, 18 Mar 2025 14:59:17 +0100 Christoph Heiss wrote: > Fixes #6214 [0]. > > As per RFC 6749 Appendix A [1], `client-id` and `client-key` can contain > any printable ascii character, i.e. anything in the (inclusive) range > 0x20-0x7E. > > Reflect that in the pattern. > > [0] https://bugzilla.proxmox.com/show_bug.cgi?id=6214 > [1] https://www.rfc-editor.org/rfc/rfc6749#appendix-A > > Signed-off-by: Christoph Heiss > --- > src/PMG/Auth/OIDC.pm | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/src/PMG/Auth/OIDC.pm b/src/PMG/Auth/OIDC.pm > index b2b1a05..5f797d1 100755 > --- a/src/PMG/Auth/OIDC.pm > +++ b/src/PMG/Auth/OIDC.pm > @@ -61,18 +61,22 @@ sub properties { > maxLength => 256, > pattern => qr/^(https?):\/\/([a-zA-Z0-9.-]+)(:[0-9]{1,5})?(\/[^\s]*)?$/, > }, > + # See RFC 6749, Appendix A for the allowed pattern for `client-id` and > + # `client-key`. > + # https://www.rfc-editor.org/rfc/rfc6749#appendix-A > + # tl;dr: anything ASCII in the (inclusive) range 0x20-0x7E > 'client-id' => { > description => "OpenID Connect Client ID", > type => 'string', > maxLength => 256, > - pattern => qr/^[a-zA-Z0-9._:-]+$/, > + pattern => qr/^[\x20-\x7E]+$/, > }, > 'client-key' => { > description => "OpenID Connect Client Key", > type => 'string', > optional => 1, > maxLength => 256, > - pattern => qr/^[a-zA-Z0-9._:-]+$/, > + pattern => qr/^[\x20-\x7E]+$/, > }, > autocreate => { > description => "Automatically create users if they do not exist.", _______________________________________________ pmg-devel mailing list pmg-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel