-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Change jwt library to golang-jwt/jwt
#1946
Conversation
17fd5f2
to
a8c7708
Compare
seems that 3.2.2 does not work with older versions. I'll add build tags for go1.15+ and reasoning is - if you care about security - which you do by wanting this change then you definitely want to use SUPPORTED version of Go (1.15+) failure with <1.15
|
… github.com/golang-jwt/jwt` due former library being unmaintained and having security issues. NOTE: `golang-jwt/jwt` now only supports last 2 Go releases. So 1.15+ For detailed information please read labstack#1940
a8c7708
to
d38346f
Compare
@lammel what do you think of it? |
I think it is the best we can do. Thank you very much for doing a PR, I was not sure you like the approach. Let me review the wording in the evening. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the suggested wording for the breaking change, if you like it.
I think this is a required step to move away from the problematic vulnerability checks by automated tools.
d38346f
to
e826a88
Compare
I do not think this will be last time we need to deal with that library and security notices. New maintainers for |
@aldas @lammel import (
"github.com/dgrijalva/jwt-go"
)
user, ok := c.Get("user").(*jwt.Token)
if !ok {
// enter here - -!
} Although I can solve this problem by modifying |
@modood You are right the situation caused by the maintenance state of Either continue using v4.4.0 or do yourself a favour and step away from the vulnerable old jwt implementation by a simple string replace. Both will work fine for you. |
Hi @modood I am sorry for your inconvience. We have been holding this change back since 2021 winter/early spring (I think) and hoped we can do the change in |
Change to latest
golang-jwt/jwt
. In reaction to midigate amount of issues that are raised. See #1940This just changes library imports and nothing more.