jwt_tool icon indicating copy to clipboard operation
jwt_tool copied to clipboard

timestamp error

Open chen1sheng opened this issue 1 year ago • 2 comments

when timestamp in token,if timestamp is 1684248669016(millisecond) the py will go wrong the full exception: Token payload values: [+] tenantId = "xxxx" [+] userId = 106 [+] userType = "build-in" [+] userName = "xxxx" [+] ext = 1684248669016 Traceback (most recent call last): File "/Users/jwt_tool-2.2.6/jwt_tool.py", line 2040, in rejigToken(headDict, paylDict, sig) File "/Users/jwt_tool-2.2.6/jwt_tool.py", line 1298, in rejigToken comparestamps, expiredtoken = dissectPayl(paylDict) File "/Users/jwt_tool-2.2.6/jwt_tool.py", line 1192, in dissectPayl timestamp = datetime.fromtimestamp(int(paylDict[claim])) ValueError: year 55340 is out of range

chen1sheng avatar May 16 '23 03:05 chen1sheng

Same error: with the token: "iat": "07/05/2023 14:14:06"

` Token header values: [+] alg = "HS256" [+] typ = "JWT"

Token payload values: [+] jti = "..." Traceback (most recent call last): File "/usr/share/jwt-tool/jwt_tool.py", line 2040, in rejigToken(headDict, paylDict, sig) File "/usr/share/jwt-tool/jwt_tool.py", line 1298, in rejigToken comparestamps, expiredtoken = dissectPayl(paylDict) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/jwt-tool/jwt_tool.py", line 1192, in dissectPayl timestamp = datetime.fromtimestamp(int(paylDict[claim])) ^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: '07/05/2023 14:17:40' `

MrHoz avatar Jul 05 '23 14:07 MrHoz

Same error: with the token: "iat": "07/05/2023 14:14:06"

` Token header values: [+] alg = "HS256" [+] typ = "JWT"

Token payload values: [+] jti = "..." Traceback (most recent call last): File "/usr/share/jwt-tool/jwt_tool.py", line 2040, in rejigToken(headDict, paylDict, sig) File "/usr/share/jwt-tool/jwt_tool.py", line 1298, in rejigToken comparestamps, expiredtoken = dissectPayl(paylDict) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/jwt-tool/jwt_tool.py", line 1192, in dissectPayl timestamp = datetime.fromtimestamp(int(paylDict[claim])) ^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: '07/05/2023 14:17:40' `

I have the issue too

wwj-saber avatar Jul 11 '23 09:07 wwj-saber