mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-11 02:20:42 -04:00
The 'jwt_tokenize' function that can be used to split a JWT token into its subparts can either fully process the token (from beginning to end) when we need to check its signature, or only partially when using the jwt_header_query or jwt_member_query converters. In this case we relied on the fact that the return value of the 'jwt_tokenize' function was not checked because a '-1' was returned (which was not actually an error). In order to make this logic more explicit, the 'jwt_tokenize' function now has a way to warn the caller that the token was invalid (less subparts than the specified 'item_num') or that the token was not processed in full (enough subparts found without parsing the token all the way). The function will now only return 0 if we found strictly the same number of subparts as 'item_num'. |
||
|---|---|---|
| .. | ||
| haproxy | ||
| import | ||
| make | ||