1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-06 14:39:03 +00:00

Avoid crash if AuthMethod key is not set in iscsi handshake. Fixes #631

This commit is contained in:
dmiller
2017-04-30 13:18:06 +00:00
parent 78f8b39b92
commit 49ba383eee

View File

@@ -589,7 +589,9 @@ Helper = {
end
local auth_method = resp.kvp:get("AuthMethod")[1]
if ( auth_method:upper() ~= "NONE" ) then
if not auth_method then
stdnse.debug1("Missing AuthMethod, proceeding as if NONE was sent.")
elseif ( auth_method:upper() ~= "NONE" ) then
return false, "ERROR: iscsi.Helper.discoverTargets: Unsupported authentication method"
end