Skip to content
Snippets Groups Projects
Commit 0c8232fe authored by Klaas Kliffen's avatar Klaas Kliffen :satellite:
Browse files

Fix wrong variable to count padding for

parent 4958c80c
Branches
No related tags found
1 merge request!8SDC-307 Cern dlaas notebook
...@@ -105,7 +105,7 @@ class shopping_client: ...@@ -105,7 +105,7 @@ class shopping_client:
try: try:
data = token.split(".")[1] data = token.split(".")[1]
padded = data + "=" * divmod(len(token), 4)[1] padded = data + "=" * divmod(len(data), 4)[1]
payload = json.loads(base64.urlsafe_b64decode(padded)) payload = json.loads(base64.urlsafe_b64decode(padded))
return payload["exp"] > int(time.time()) + 10 return payload["exp"] > int(time.time()) + 10
except KeyError: except KeyError:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment