]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-oauth2: oauth2-jwt - Always uppercase algorithm
authorAki Tuomi <aki.tuomi@open-xchange.com>
Tue, 2 Jun 2020 13:07:48 +0000 (16:07 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 5 Jun 2020 06:12:08 +0000 (09:12 +0300)
src/lib-oauth2/oauth2-jwt.c

index a837297ae30126918aa7f2418116e821e3674516..7b0aaa0482fd17689daf60a24f5e7c12a71eb534 100644 (file)
@@ -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;
 }