From 3bfb56bbb167b13e219761f24d024cd29881521a Mon Sep 17 00:00:00 2001 From: patrik Date: Fri, 23 Mar 2012 19:23:25 +0000 Subject: [PATCH] bugfix for withindomain and withinhost checks. --- nselib/httpspider.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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