From 9152c48f0a1c1100e0d0155c6ef7844979cc84bb Mon Sep 17 00:00:00 2001 From: ram vikram singh Date: Tue, 11 Oct 2022 00:07:09 +0530 Subject: [PATCH] decoding a not safe url in load_kube_config for issue #1911 fixing load_kube_config for decoding unsafe url token --- kubernetes/base/config/kube_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/base/config/kube_config.py b/kubernetes/base/config/kube_config.py index ed70df0ca8..1c0a0ca054 100644 --- a/kubernetes/base/config/kube_config.py +++ b/kubernetes/base/config/kube_config.py @@ -398,7 +398,7 @@ def _load_oid_token(self, provider): if PY3: jwt_attributes = json.loads( - base64.b64decode(parts[1] + padding).decode('utf-8') + base64.urlsafe_b64decode(parts[1] + padding).decode('utf-8') ) else: jwt_attributes = json.loads(