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 3819E1FF13C for ; Thu, 19 Mar 2026 14:01:28 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 4E0751E7FA; Thu, 19 Mar 2026 14:01:43 +0100 (CET) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 19 Mar 2026 14:01:05 +0100 Message-Id: To: "Shannon Sterz" Subject: Re: [PATCH yew-comp] fix #7290: url decode code value in openid redirection authorization X-Mailer: aerc 0.20.0 References: <20260224135428.234018-1-s.sterz@proxmox.com> In-Reply-To: <20260224135428.234018-1-s.sterz@proxmox.com> From: "Shannon Sterz" X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1773925223214 X-SPAM-LEVEL: Spam detection results: 0 AWL -1.319 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 KAM_INFOUSMEBIZ 0.75 Prevalent use of .info|.us|.me|.me.uk|.biz|xyz|id|rocks|life domains in spam/malware RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.408 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.819 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.903 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 WEIRD_PORT 0.001 Uses non-standard port number for HTTP Message-ID-Hash: Q3T2GKURIZMDZH2WV4HIL6SJNZ6YAT6C X-Message-ID-Hash: Q3T2GKURIZMDZH2WV4HIL6SJNZ6YAT6C X-MailFrom: s.sterz@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 CC: yew-devel@lists.proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Yew framework devel list at Proxmox List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: for reference this was applied: https://git.proxmox.com/?p=3Dui/proxmox-yew-comp.git;a=3Dcommit;h=3D38cf08a= d2d8a13645c37be10b2062f33a2ac66f4 On Tue Feb 24, 2026 at 2:54 PM CET, Shannon Sterz wrote: > this should fix a bug that broke compatability with google's oauth > implementation, which seems to regularly use values requiring url > encoding. > > Signed-off-by: Shannon Sterz > --- > > tested this against google's o auth provider following this guide: > > https://chriscolotti.us/technology/using-google-workspace-oauth-with-prox= mox/ > > set the "Authorized JavaScript origins" and "Authorized redirect URIs" > to "https://pdm-test.erna.proxmox.com:8443" and added a line to my > `/etc/hosts` to make that name resolution work as intended. > > src/utils/mod.rs | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/utils/mod.rs b/src/utils/mod.rs > index 600e436..c007286 100644 > --- a/src/utils/mod.rs > +++ b/src/utils/mod.rs > @@ -258,7 +258,9 @@ pub fn openid_redirection_authorization() -> Option> { > > match (key_value.next(), key_value.next()) { > (Some("?code") | Some("code"), Some(value)) =3D> { > - auth.insert("code".to_string(), value.to_string()); > + if let Ok(code) =3D percent_decode(value.as_bytes()).dec= ode_utf8() { > + auth.insert("code".to_string(), code.to_string()); > + } > } > (Some("?state") | Some("state"), Some(value)) =3D> { > if let Ok(decoded) =3D percent_decode(value.as_bytes()).= decode_utf8() { > -- > 2.47.3