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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user