From baaf006275eaae9b446c1b024f083d0fa2be22ec Mon Sep 17 00:00:00 2001 From: lixiumei Date: Tue, 26 Apr 2022 07:20:32 +0000 Subject: [PATCH] Add jwt to get iss-grant result judgement --- src/utils/neu_jwt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/utils/neu_jwt.c b/src/utils/neu_jwt.c index ea0d804c..9790e00c 100644 --- a/src/utils/neu_jwt.c +++ b/src/utils/neu_jwt.c @@ -234,6 +234,11 @@ static void *neu_jwt_decode(char *token) } name = jwt_get_grant(jwt_test, "iss"); + if (NULL == name) { + log_error("jwt get iss grant error, the token is: %s", token); + jwt_free(jwt_test); + return NULL; + } for (int i = 0; i < n_pub_file; i++) { if (NULL != strstr((char *) pub_key_files[i].name, name)) {