From 8572c85d0bd367dcb3e5fbffdbed3f9efa4e17be Mon Sep 17 00:00:00 2001 From: sophron Date: Tue, 30 Jul 2013 00:03:04 +0000 Subject: [PATCH] Correctly handle cases where the tested fingerprint path does not end with "/". Patch by nnposter. --- nselib/data/http-default-accounts-fingerprints.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nselib/data/http-default-accounts-fingerprints.lua b/nselib/data/http-default-accounts-fingerprints.lua index 36efea9b2..88e08b7e7 100644 --- a/nselib/data/http-default-accounts-fingerprints.lua +++ b/nselib/data/http-default-accounts-fingerprints.lua @@ -47,7 +47,7 @@ end -- @return True if login in was successful --- local function try_http_post_login(host, port, path, target, failstr, params, follow_redirects) - local req = http.post(host, port, path..target, {no_cache=true}, nil, params) + local req = http.post(host, port, path:gsub("[^/]+$","")..target, {no_cache=true}, nil, params) if not req.status then return false end local status = tonumber(req.status) or 0