jwtk/jjwt

Base64 Decode fails when _(underbar) is present in JWT Token

kyle-hong opened this issue · 0 comments

Describe the bug
If the JWT payload contains _(underbar), decode fails with the following exception.

io.jsonwebtoken.io.DecodingException: Illegal base64 character: '_'
    at io.jsonwebtoken.io.Base64.ctoi(Base64.java:221)
    at io.jsonwebtoken.io.Base64.decodeFast(Base64.java:270)
    at io.jsonwebtoken.io.Base64Decoder.decode(Base64Decoder.java:36)
    at io.jsonwebtoken.io.Base64Decoder.decode(Base64Decoder.java:23)
    at io.jsonwebtoken.io.ExceptionPropagatingDecoder.decode(ExceptionPropagatingDecoder.java:36)