mirror of https://github.com/golang-jwt/jwt.git
fix array OOB panic (#100)
This commit is contained in:
parent
52c68d1293
commit
dd0ede9741
|
@ -205,5 +205,8 @@ func signToken() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func isEs() bool {
|
func isEs() bool {
|
||||||
return (*flagAlg)[0:2] == "ES"
|
if alg := *flagAlg; len(alg) >= 2 && alg[0:2] == "ES" {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue