]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-oauth2: Remove typ check
authorAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 8 May 2023 05:23:39 +0000 (08:23 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Thu, 11 May 2023 11:35:35 +0000 (14:35 +0300)
It is not really useful. And mostly just keeps breaking when people
invent new kty values.

src/lib-oauth2/oauth2-jwt.c

index 0068dd3e960b37fa3a0805a300a1b7b12ae3a2db..bb7c8e763adec3ffd0441212a1303c8f6b684033 100644 (file)
@@ -337,15 +337,9 @@ static int
 oauth2_jwt_header_process(struct json_tree *tree, const char **alg_r,
                          const char **kid_r, const char **error_r)
 {
-       const char *typ = get_field(tree, "typ", NULL);
        const char *alg = get_field(tree, "alg", NULL);
        const char *kid = get_field(tree, "kid", NULL);
 
-       if (typ != NULL && strcasecmp(typ, "JWT") != 0) {
-               *error_r = t_strdup_printf("Unsupported typ value '%s'", typ);
-               return -1;
-       }
-
        if (alg == NULL) {
                *error_r = "Cannot find 'alg' field";
                return -1;