arun11299 / cpp-jwt

JSON Web Token library for C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Empty signature part triggers assert

GeneratedNickname opened this issue · 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));