1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Fix crash when field doesn't exist. Closes #306

This commit is contained in:
dmiller
2016-03-03 17:15:12 +00:00
parent 5b5524d4ba
commit b39e055e32

View File

@@ -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