From: Aki Tuomi Date: Tue, 2 Jun 2020 13:07:48 +0000 (+0300) Subject: lib-oauth2: oauth2-jwt - Always uppercase algorithm X-Git-Tag: 2.3.11.2~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=10288b7a3bbd8460b77bd324410fb9ea13e45fc3;p=thirdparty%2Fdovecot%2Fcore.git lib-oauth2: oauth2-jwt - Always uppercase algorithm --- diff --git a/src/lib-oauth2/oauth2-jwt.c b/src/lib-oauth2/oauth2-jwt.c index a837297ae3..7b0aaa0482 100644 --- a/src/lib-oauth2/oauth2-jwt.c +++ b/src/lib-oauth2/oauth2-jwt.c @@ -263,8 +263,9 @@ oauth2_jwt_header_process(struct json_tree *tree, const char **alg_r, return -1; } - /* these are lost when tree is deinit */ - *alg_r = t_strdup(algo); + /* These are lost when tree is deinitialized. + Make sure algorithm is uppercased. */ + *alg_r = t_str_ucase(algo); *kid_r = t_strdup(kid); return 0; }