You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry for the long delay. Somehow this issue slipped my radar. The function was intentionally changed in this PR: #40
The current implementation is a little bit better in terms of security, because an "empty string" is not valid for exp. According to the RFC, exp must be a date timestamp in a JSON number. Therefore, we decided to return false in the end of the switch statement in case someone is trying to validate a token with exp being anything else but a JSON number as an additional safeguard.
The VerifyExpiresAt function returns false when it is not required and the exp token is an empty string because it returns
false
if there is not a match in the switch statement: https://github.com/golang-jwt/jwt/blob/main/map_claims.go#L58Based on the comment on the method and the old version of this method, it seems like this is a bug.
The text was updated successfully, but these errors were encountered: