diff --git a/nselib/httpspider.lua b/nselib/httpspider.lua index 08565669b..041b3f0df 100644 --- a/nselib/httpspider.lua +++ b/nselib/httpspider.lua @@ -84,7 +84,7 @@ Options = { local parsed_u = url.parse(tostring(u)) if ( o.base_url:getPort() ~= 80 and o.base_url:getPort() ~= 443 ) then - if ( parsed_u.port ~= o.base_url:getPort() ) then + if ( tonumber(parsed_u.port) ~= tonumber(o.base_url:getPort()) ) then return false end elseif ( parsed_u.scheme ~= o.base_url:getProto() ) then @@ -98,7 +98,7 @@ Options = { o.withindomain = function(u) local parsed_u = url.parse(tostring(u)) if ( o.base_url:getPort() ~= 80 and o.base_url:getPort() ~= 443 ) then - if ( parsed_u.port ~= o.base_url:getPort() ) then + if ( tonumber(parsed_u.port) ~= tonumber(o.base_url:getPort()) ) then return false end elseif ( parsed_u.scheme ~= o.base_url:getProto() ) then