mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
Fix crash when field doesn't exist. Closes #306
This commit is contained in:
parent
5b5524d4ba
commit
b39e055e32
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue