Skip to content
Snippets Groups Projects
Verified Commit fc3f6487 authored by Petr Špaček's avatar Petr Špaček
Browse files

doh: fix error handling around empty POST

parent ec56c815
Branches
Tags
1 merge request!799DNS-over-HTTP support (server side)
......@@ -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'
......
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