Attempting to pass an empty or null token to the jwt parser will cause a fatal error (ErrTokenMalformed) and panic (panic: runtime error: invalid memory address or nil pointer dereference). I'm simply checking that the rawData is not of length 0, otherwise throw the same error (error reading JWT data file) before trying to hand it off to the jwt parser.
Something I should've caught previously, but I did not have a test for it. I do now.
Attempting to pass an empty or null token to the jwt parser will cause a fatal error (
ErrTokenMalformed
) and panic (panic: runtime error: invalid memory address or nil pointer dereference
). I'm simply checking that therawData
is not of length0
, otherwise throw the same error (error reading JWT data file
) before trying to hand it off to the jwt parser.Something I should've caught previously, but I did not have a test for it. I do now.