cpp-jwt icon indicating copy to clipboard operation
cpp-jwt copied to clipboard

Empty signature part triggers assert

Open GeneratedNickname opened this issue 4 years ago • 0 comments

jwt_object::three_parts tries to read part three with negative length. Expected: Some kind of invalid_format error.

Reproduction:

jwt::decode("eyJ0eXAiOiJKV1QiLCJhbGciOiJub25lIn0.eyJtdl9jbGFpbSI6WyJmaXJzdCIsInNlY29uZCJdfQ.", jwt::params::algorithms({alg_to_str(jwt::algorithm::NONE)}), jwt::params::verify(false));

GeneratedNickname avatar Oct 20 '21 10:10 GeneratedNickname