From 879a1fefbbdadda84d0647b3c61c2b39c6c74c75 Mon Sep 17 00:00:00 2001 From: holden093 Date: Wed, 10 Jun 2026 19:14:52 +0200 Subject: [PATCH] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- core/oidc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/oidc.py b/core/oidc.py index cb9223637..faad849ad 100644 --- a/core/oidc.py +++ b/core/oidc.py @@ -434,8 +434,9 @@ class OidcManager: parts = id_token.split(".") if len(parts) >= 2: import base64 - # Pad to a multiple of 4 - padded = parts[0] + "=" * (4 - len(parts[0]) % 4) + # Pad to a multiple of 4 (base64url) + pad_len = (-len(parts[0])) % 4 + padded = parts[0] + ("=" * pad_len) return json.loads(base64.urlsafe_b64decode(padded)) except Exception: pass