-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError #21
Comments
Could you provide a sample token that causes this behaviour? Thanks. |
Hey, Payload = { Switching line 91 in castInput from Fixed the issue. (Not sure if it will break further along from this, but it works for my current use-case). Hope that helps. |
following comments on ticarpi#21 , user @fredsibcald says that fix the problem
I had the same issue working with a JWT (unfortunately given NDA I cannot share) that had nested JSON and this fixed it. |
Thanks all, this should be fixed in v1.3.5 |
When running python3 jwt_tool.py -T or -R i get:
Traceback (most recent call last):
File "jwt_tool.py", line 1393, in
tamperToken(paylDict, headDict, sig)
File "jwt_tool.py", line 761, in tamperToken
comparestamps, expiredtoken = dissectPayl(paylDict, count=True)
File "jwt_tool.py", line 1187, in dissectPayl
elif type(castInput(paylDict[claim][subclaim])) == str:
File "jwt_tool.py", line 91, in castInput
newInput = json.loads(newInput)
File "C:**\AppData\Local\Programs\Python\Python38-32\lib\json_init_.py", line 341, in loads
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not list
or
Traceback (most recent call last):
File "jwt_tool.py", line 1483, in
rejigToken(headDict, paylDict, sig)
File "jwt_tool.py", line 1280, in rejigToken
comparestamps, expiredtoken = dissectPayl(paylDict)
File "jwt_tool.py", line 1187, in dissectPayl
elif type(castInput(paylDict[claim][subclaim])) == str:
File "jwt_tool.py", line 91, in castInput
newInput = json.loads(newInput)
File "C:**\AppData\Local\Programs\Python\Python38-32\lib\json_init_.py", line 341, in loads
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not list
The text was updated successfully, but these errors were encountered: