1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 22:21:29 +00:00

URL ports have to be decimal digits.

RFC 3986 section 3.2.3.
This commit is contained in:
david
2013-02-07 03:06:29 +00:00
parent 45b5d92f3d
commit 1c7c414fbb

View File

@@ -183,7 +183,7 @@ function parse(url, default)
if not authority then return parsed end
authority = string.gsub(authority,"^([^@]*)@",
function(u) parsed.userinfo = u; return "" end)
authority = string.gsub(authority, ":([^:]*)$",
authority = string.gsub(authority, ":([0-9]*)$",
function(p) parsed.port = p; return "" end)
if authority ~= "" then parsed.host = authority end
local userinfo = parsed.userinfo