dgrijalva/jwt-go

Example code is memory insecure

Opened this issue · 1 comments

gardc commented

Referring to this example pointed to by the readme, feeding it an invalid JWT will create a memory panic.

Go playground example.

Checking for err and token.Valid before assuming it's all good in the hood fixes the issue, Go playground example.