Skip to content
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

timestamp error #95

Open
chen1sheng opened this issue May 16, 2023 · 2 comments
Open

timestamp error #95

chen1sheng opened this issue May 16, 2023 · 2 comments

Comments

@chen1sheng
Copy link

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

@MrHoz
Copy link

MrHoz commented Jul 5, 2023

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'
`

@wwj-saber
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants