BUG/MINOR: jwt: Fix jwt_parse_alg incorrectly returning JWS_ALG_NONE
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Wed, 3 Nov 2021 11:23:54 +0000 (12:23 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 3 Nov 2021 16:19:48 +0000 (17:19 +0100)
commit726635018109eda90490a03660a6f244a0c5682e
treec42bb57dcaac89f7487ddded83beb4d39db509aa
parentf8642ee826640bf85e51641cd3a47da7b90e174f
BUG/MINOR: jwt: Fix jwt_parse_alg incorrectly returning JWS_ALG_NONE

jwt_parse_alg would mistakenly return JWT_ALG_NONE for algorithms "",
"n", "no" and "non" because of a strncmp misuse. It now sees them as
unknown algorithms.

No backport needed.

Cc: Tim Duesterhus <tim@bastelstu.be>
src/jwt.c