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. |
lammel
left a comment
There was a problem hiding this comment.
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.