Thalhammer / jwt-cpp

A header only library for creating and validating json web tokens in c++
https://thalhammer.github.io/jwt-cpp/
MIT License
886 stars 241 forks source link

Improve error feedback for base64 decoding #253

Open prince-chrismc opened 2 years ago

prince-chrismc commented 2 years ago

This problem was very difficult to detect. Because prints were the same. But strings weren't been the same. My string has a lot of white characters inside (Not only on end and begin).

Originally posted by @hanusek in https://github.com/Thalhammer/jwt-cpp/issues/248#issuecomment-1257887655


Ideally the error messages would include a position and element that is invalid. Currently the messages are tok generic