From e7cb28619e371b56a140fea599ed333109ec7bf3 Mon Sep 17 00:00:00 2001 From: patrik Date: Fri, 3 Aug 2012 06:13:57 +0000 Subject: [PATCH] fixed a bug where any url would be treated as withinhost due to a lacking return statement in the removewww function --- nselib/httpspider.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nselib/httpspider.lua b/nselib/httpspider.lua index b82791462..9698c1279 100644 --- a/nselib/httpspider.lua +++ b/nselib/httpspider.lua @@ -85,7 +85,7 @@ Options = { o.timeout = options.timeout or 10000 o.whitelist = o.whitelist or {} o.blacklist = o.blacklist or {} - local removewww = function(url) string.gsub(url, "^www%.", "") end + local removewww = function(url) return string.gsub(url, "^www%.", "") end if ( o.withinhost == true or o.withindomain == true ) then -- set up the appropriate matching functions