Skip to content

Commit f054f11

Browse files
committed
Added else error condition to avert compiler warning.
1 parent 6e00072 commit f054f11

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ngx_http_auth_jwt_module.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ static ngx_int_t ngx_http_auth_jwt_handler(ngx_http_request_t *r)
175175
ngx_memcpy(keyBinary, jwtcf->auth_jwt_key.data, jwtcf->auth_jwt_key.len);
176176
keylen = jwtcf->auth_jwt_key.len;
177177
}
178+
else
179+
{
180+
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "unsupported algorithm");
181+
goto redirect;
182+
}
178183

179184
// validate the jwt
180185
jwtParseReturnCode = jwt_decode(&jwt, jwtCookieValChrPtr, keyBinary, keylen);

0 commit comments

Comments
 (0)