diff --git a/scripts/http-form-brute.nse b/scripts/http-form-brute.nse index 73a9a164b..3837cecab 100644 --- a/scripts/http-form-brute.nse +++ b/scripts/http-form-brute.nse @@ -240,7 +240,8 @@ local detect_form = function (host, port, path, hostname) local match = true -- first check the 'match' table and be sure all values match for k, v in pairs(val.match) do - match = match and string.match(form[k], v) + -- ensure that corresponding field exists in form table also + match = match and form[k] and string.match(form[k], v) end -- then check that uservar and passvar are in this form if match then