FIX - isolate custom app JSON payload

This commit is contained in:
Leon.Schmidt
2026-08-11 19:00:51 +02:00
parent c95775fb2c
commit 4be632759b
2 changed files with 10 additions and 3 deletions
+2 -1
View File
@@ -280,7 +280,8 @@ local function normalize_json_payload(payload, maximum_bytes)
return nil, "payload_too_large"
end
return json.decode(encoded)
local decoded = json.decode(encoded)
return decoded
end
local function validate_optional_text(value, error_code, maximum_length)
+8 -2
View File
@@ -24,10 +24,16 @@ Config = {
}
json = {
decode = function()
decode = function(encoded)
if encoded == "null" then
return nil, 5
end
return {}
end,
encode = function()
encode = function(value)
if value == nil then
return "null"
end
return "{}"
end,
}