Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
holden093 2026-06-10 19:14:52 +02:00
parent 873fd1997d
commit 879a1fefbb

View file

@ -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