Commit fc3f6487 authored by Petr Špaček's avatar Petr Špaček

doh: fix error handling around empty POST

parent ec56c815
......@@ -30,7 +30,7 @@ local function serve_doh(h, stream)
return 405, 'only HTTP POST and GET are supported'
end
if #input < 12 then
if not input or #input < 12 then
return 400, 'input too short'
elseif #input > 1024 then
return 413, 'input too long'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment