Skip to content

Commit 8a67dfe

Browse files
author
Crazy-xyr
committed
fix: add body.node check
1 parent 2468f40 commit 8a67dfe

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

apisix/admin/utils.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ function _M.decrypt_params(decrypt_func, body, schema_type)
104104
end
105105

106106
-- metadata
107-
if schema_type == core.schema.TYPE_METADATA then
108-
local conf = body.node and body.node.value
107+
local conf = body.node and body.node.value
108+
if conf and schema_type == core.schema.TYPE_METADATA then
109109
decrypt_func(conf.name, conf, schema_type)
110110
end
111111
end

test-nginx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 44276aa08b981ea0d03be7d557dd9e1a3641305c

0 commit comments

Comments
 (0)