[Bug] SecurityTokenNoExpirationException when the Expiration Date is larger than January 19, 2038 #2124
Closed
1 of 14 tasks
Labels
Bug
Product is not functioning as expected
Customer reported
Indicates issue was opened by customer
P2
High, but not urgent. Needs to be addressed within the next couple of sprints
Milestone
Which version of Microsoft.IdentityModel are you using?
Microsoft.IdentityModel 6.15.1
Where is the issue?
Is this a new or an existing app?
The app is in production and I haven't upgraded Microsoft.IdentityModel.*, but started seeing this issue.
Repro
Expected behavior
The token should be valid and expire in 25 years
Actual behavior
Lifetime validation failed. The token is missing an Expiration Time:
Possible solution
It seems that the getter in
JwtPlayoad.cs
usesint?
, which has aMaxValue
of2147483647
. This is transtlated toTuesday, January 19, 2038 3:14:07 AM
, so expiration dates larger than this are invalid.Additional context / logs / screenshots / links to code
azure-activedirectory-identitymodel-extensions-for-dotnet/src/System.IdentityModel.Tokens.Jwt/JwtPayload.cs
Lines 223 to 226 in 23808d5
The text was updated successfully, but these errors were encountered: