Skip to content

Commit 2978982

Browse files
committed
correct Cursor validation
1 parent fb680c3 commit 2978982

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

resources/lib/twitch/api/parameters.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ class Cursor(_Parameter):
7676
@classmethod
7777
def validate(cls, value):
7878
try:
79-
decoded = int(b64decode(value))
79+
padding = (4 - len(value) % 4) % 4
80+
padding *= '='
81+
decoded = b64decode(value + padding)
8082
return value
8183
except ValueError:
8284
raise ValueError(value)

0 commit comments

Comments
 (0)