From fc575b9749aa5bfe577b15647f3d95bc546370fb Mon Sep 17 00:00:00 2001 From: alex-smile <443677891@qq.com> Date: Tue, 29 Aug 2023 12:05:15 +0800 Subject: [PATCH] x-bkapi-authorization should be a a valid json dict --- src/apisix/plugins/bk-auth-verify.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apisix/plugins/bk-auth-verify.lua b/src/apisix/plugins/bk-auth-verify.lua index 2363ef7..3d06c73 100644 --- a/src/apisix/plugins/bk-auth-verify.lua +++ b/src/apisix/plugins/bk-auth-verify.lua @@ -70,7 +70,7 @@ local function get_auth_params_from_header(ctx) end local auth_params = core.json.decode(authorization) - if auth_params == nil then + if type(auth_params) ~= "table" then return nil, "request header X-Bkapi-Authorization is not a valid JSON" end